From b5896c37922e09529e61db4b3dd946cf2ecb211e Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 30 Mar 2010 22:28:46 +0000 Subject: 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 --- lib/CodeGen/CGExprAgg.cpp | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'lib/CodeGen/CGExprAgg.cpp') diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 4d5160f39b..e2e2cd0504 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -771,27 +771,12 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, // a = b; // } // - // we need to use a different call here. We use isVolatile to indicate when + // we need to use a differnt call here. We use isVolatile to indicate when // either the source or the destination is volatile. - const llvm::Type *I1Ty = llvm::Type::getInt1Ty(VMContext); - const llvm::Type *I8Ty = llvm::Type::getInt8Ty(VMContext); - const llvm::Type *I32Ty = llvm::Type::getInt32Ty(VMContext); - - const llvm::PointerType *DPT = cast(DestPtr->getType()); - const llvm::Type *DBP = llvm::PointerType::get(I8Ty, DPT->getAddressSpace()); - if (DestPtr->getType() != DBP) - DestPtr = Builder.CreateBitCast(DestPtr, DBP, "tmp"); - - const llvm::PointerType *SPT = cast(SrcPtr->getType()); - const llvm::Type *SBP = llvm::PointerType::get(I8Ty, SPT->getAddressSpace()); - if (SrcPtr->getType() != SBP) - SrcPtr = Builder.CreateBitCast(SrcPtr, SBP, "tmp"); - - Builder.CreateCall5(CGM.getMemCpyFn(DestPtr->getType(), SrcPtr->getType(), - IntPtr), + Builder.CreateCall4(CGM.getMemCpyFn(), DestPtr, SrcPtr, // TypeInfo.first describes size in bits. llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), - llvm::ConstantInt::get(I32Ty, TypeInfo.second/8), - llvm::ConstantInt::get(I1Ty, isVolatile)); + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), + TypeInfo.second/8)); } -- cgit v1.2.3-70-g09d2