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
This commit is contained in:
Mike Stump 2009-10-20 20:30:01 +00:00
parent 7f903681ac
commit 38382028c7
1 changed files with 4 additions and 1 deletions

View File

@ -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 *