[cfe-commits] r84668 - /cfe/trunk/lib/CodeGen/CGBlocks.cpp
Mike Stump
mrs at apple.com
Tue Oct 20 13:30:01 PDT 2009
Author: mrs
Date: Tue Oct 20 15:30:01 2009
New Revision: 84668
URL: http://llvm.org/viewvc/llvm-project?rev=84668&view=rev
Log:
For now, we need to have the llvm type of the block pointer remain as
it was. Fixes codegen bug introduced yesterday.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=84668&r1=84667&r2=84668&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Tue Oct 20 15:30:01 2009
@@ -576,7 +576,10 @@
}
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 *
More information about the cfe-commits
mailing list