de-tmpify clang.

llvm-svn: 140637
This commit is contained in:
Benjamin Kramer
2011-09-27 21:06:10 +00:00
parent af136f71ec
commit 76399eb2ad
13 changed files with 90 additions and 97 deletions

View File

@@ -727,9 +727,9 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E,
Builder.CreateBitCast(Callee, BlockLiteralTy, "block.literal");
// Get the function pointer from the literal.
llvm::Value *FuncPtr = Builder.CreateStructGEP(BlockLiteral, 3, "tmp");
llvm::Value *FuncPtr = Builder.CreateStructGEP(BlockLiteral, 3);
BlockLiteral = Builder.CreateBitCast(BlockLiteral, VoidPtrTy, "tmp");
BlockLiteral = Builder.CreateBitCast(BlockLiteral, VoidPtrTy);
// Add the block literal.
CallArgList Args;
@@ -742,7 +742,7 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E,
E->arg_begin(), E->arg_end());
// Load the function.
llvm::Value *Func = Builder.CreateLoad(FuncPtr, "tmp");
llvm::Value *Func = Builder.CreateLoad(FuncPtr);
const FunctionType *FuncTy = FnType->castAs<FunctionType>();
const CGFunctionInfo &FnInfo = CGM.getTypes().getFunctionInfo(Args, FuncTy);