Skip to content

Commit 3555289

Browse files
Revert "[AST] Support SILFunctionType/SILBlockStorageType in ClangTypeConverter."
This reverts commit feb76ea.
1 parent 191b0d8 commit 3555289

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/AST/ClangTypeConverter.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -570,19 +570,12 @@ clang::QualType ClangTypeConverter::visitFunctionType(FunctionType *type) {
570570
}
571571

572572
clang::QualType ClangTypeConverter::visitSILFunctionType(SILFunctionType *type) {
573-
// We must've already computed it before if applicable.
574-
return clang::QualType(type->getClangFunctionType(), 0);
573+
llvm::report_fatal_error("Expected only AST types but found a SIL function.");
575574
}
576575

577576
clang::QualType
578577
ClangTypeConverter::visitSILBlockStorageType(SILBlockStorageType *type) {
579-
// We'll select (void)(^)(). This isn't correct for all blocks, but block
580-
// storage type should only be converted for function signature lowering,
581-
// where the parameter types do not matter.
582-
auto &clangCtx = ClangASTContext;
583-
auto fnTy = clangCtx.getFunctionNoProtoType(clangCtx.VoidTy);
584-
auto blockTy = clangCtx.getBlockPointerType(fnTy);
585-
return clangCtx.getCanonicalType(blockTy);
578+
llvm::report_fatal_error("Expected only AST types but found a SIL block.");
586579
}
587580

588581
clang::QualType

0 commit comments

Comments
 (0)