From: Daniel Dunbar Date: Fri, 9 Jan 2009 02:48:46 +0000 (+0000) Subject: Convert block types in IRgen. This is not the correct type, but X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e174f1b1e95faacc21da2eac70f7853807f3ea3;p=clang Convert block types in IRgen. This is not the correct type, but matches llvm-gcc (?). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61974 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index e8a38a286b..47e41e9722 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -308,7 +308,9 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { } case Type::BlockPointer: { - assert(0 && "FIXME: Cannot get type of block pointer."); + const QualType FTy = cast(Ty).getPointeeType(); + return llvm::PointerType::get(ConvertTypeRecursive(FTy), + FTy.getAddressSpace()); } }