diff options
author | Chris Lattner <sabre@nondot.org> | 2010-06-27 07:15:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-06-27 07:15:29 +0000 |
commit | 77b89b87c3b9220fea1bc80f6d6598d2003cc8a8 (patch) | |
tree | 1d5d19bdc8f8f05fd100a0e161b3bad78cd58269 /lib/CodeGen/CGExprAgg.cpp | |
parent | ec2830d930e306124c2ba6bf1060a3c71dced6ea (diff) |
finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 04e0044aaf..9d044fff77 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -818,8 +818,6 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, std::pair<uint64_t, unsigned> TypeInfo = getContext().getTypeInfo(Ty); // FIXME: Handle variable sized types. - const llvm::Type *IntPtr = - llvm::IntegerType::get(VMContext, LLVMPointerWidth); // FIXME: If we have a volatile struct, the optimizer can remove what might // appear to be `extra' memory ops: @@ -835,7 +833,6 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, // 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<llvm::PointerType>(DestPtr->getType()); const llvm::Type *DBP = llvm::PointerType::get(I8Ty, DPT->getAddressSpace()); @@ -872,10 +869,10 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, } Builder.CreateCall5(CGM.getMemCpyFn(DestPtr->getType(), SrcPtr->getType(), - IntPtr), + IntPtrTy), 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(IntPtrTy, TypeInfo.first/8), + llvm::ConstantInt::get(Int32Ty, TypeInfo.second/8), llvm::ConstantInt::get(I1Ty, isVolatile)); } |