diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-03-30 22:28:46 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-03-30 22:28:46 +0000 |
commit | b5896c37922e09529e61db4b3dd946cf2ecb211e (patch) | |
tree | d25fa964fc22ae1399efebcae2d6c9e4e56e09d0 /lib/CodeGen/CGDecl.cpp | |
parent | 69d66b28dc953ae7c2c0b877c78ccd9c691b44f1 (diff) |
Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 07d219f1fb..4eb95af8ff 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -564,15 +564,11 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) { if (Loc->getType() != BP) Loc = Builder.CreateBitCast(Loc, BP, "tmp"); - llvm::Value *NotVolatile = - llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0); - // If the initializer is all zeros, codegen with memset. if (isa<llvm::ConstantAggregateZero>(Init)) { llvm::Value *Zero = - llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); - Builder.CreateCall5(CGM.getMemSetFn(Loc->getType(), SizeVal->getType()), - Loc, Zero, SizeVal, AlignVal, NotVolatile); + llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); + Builder.CreateCall4(CGM.getMemSetFn(), Loc, Zero, SizeVal, AlignVal); } else { // Otherwise, create a temporary global with the initializer then // memcpy from the global to the alloca. @@ -586,10 +582,8 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) { llvm::Value *SrcPtr = GV; if (SrcPtr->getType() != BP) SrcPtr = Builder.CreateBitCast(SrcPtr, BP, "tmp"); - - Builder.CreateCall5(CGM.getMemCpyFn(Loc->getType(), SrcPtr->getType(), - SizeVal->getType()), - Loc, SrcPtr, SizeVal, AlignVal, NotVolatile); + + Builder.CreateCall4(CGM.getMemCpyFn(), Loc, SrcPtr, SizeVal, AlignVal); } } else if (Ty->isReferenceType()) { RValue RV = EmitReferenceBindingToExpr(Init, /*IsInitializer=*/true); |