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 | 5e016ae983e1ddc24fca7a04d8399cbd673707c2 (patch) | |
| tree | b8cd5a201ca00c55a7312eab58c3d47b08cb8ded /clang/lib/CodeGen/CGExprAgg.cpp | |
| parent | e000907e136ec7b1f3fc025c49711780f6b1c4c8 (diff) | |
| download | llvm-5e016ae983e1ddc24fca7a04d8399cbd673707c2.zip llvm-5e016ae983e1ddc24fca7a04d8399cbd673707c2.tar.gz llvm-5e016ae983e1ddc24fca7a04d8399cbd673707c2.tar.bz2 | |
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.
llvm-svn: 106977
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 04e0044..9d044ff 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/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)); } |
