diff options
author | Mike Stump <mrs@apple.com> | 2009-10-20 20:30:01 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-20 20:30:01 +0000 |
commit | 38382028c7cd37bdb285bf0ee3785f52888678c9 (patch) | |
tree | 45d774270bda9f73e22494a0a4a29605eb2def04 /clang/lib | |
parent | 7f903681acbc5212a86f4e45283213ccfb22e05b (diff) | |
download | bcm5719-llvm-38382028c7cd37bdb285bf0ee3785f52888678c9.tar.gz bcm5719-llvm-38382028c7cd37bdb285bf0ee3785f52888678c9.zip |
For now, we need to have the llvm type of the block pointer remain as
it was. Fixes codegen bug introduced yesterday.
llvm-svn: 84668
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 59984939861..8e020c80ead 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -576,7 +576,10 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) { } llvm::Value *CodeGenFunction::LoadBlockStruct() { - return Builder.CreateLoad(LocalDeclMap[getBlockStructDecl()], "self"); + llvm::Value *V = Builder.CreateLoad(LocalDeclMap[getBlockStructDecl()], + "self"); + // For now, we codegen based upon byte offsets. + return Builder.CreateBitCast(V, PtrToInt8Ty); } llvm::Function * |