diff options
author | Anders Carlsson <andersca@mac.com> | 2008-08-30 16:17:45 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-08-30 16:17:45 +0000 |
commit | 958444659c5287a81a43188bfaa2a4902752b947 (patch) | |
tree | 8c208217b4ef6759d29b5d5c94aaf14b7e72e6f0 /lib/CodeGen/CGExprAgg.cpp | |
parent | 7f8ea5c5b3a6a4332a841eefdd86b0726722ea7b (diff) |
Simplify some calls to Builder.CreateCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 11eb9fc115..13c07c9596 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -125,15 +125,13 @@ void AggExprEmitter::EmitAggregateClear(llvm::Value *DestPtr, QualType Ty) { // FIXME: Handle variable sized types. const llvm::Type *IntPtr = llvm::IntegerType::get(CGF.LLVMPointerWidth); - llvm::Value *MemSetOps[4] = { - DestPtr, - llvm::ConstantInt::getNullValue(llvm::Type::Int8Ty), - // TypeInfo.first describes size in bits. - llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), - llvm::ConstantInt::get(llvm::Type::Int32Ty, TypeInfo.second/8) - }; - - Builder.CreateCall(CGF.CGM.getMemSetFn(), MemSetOps, MemSetOps+4); + Builder.CreateCall4(CGF.CGM.getMemSetFn(), + DestPtr, + llvm::ConstantInt::getNullValue(llvm::Type::Int8Ty), + // TypeInfo.first describes size in bits. + llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), + llvm::ConstantInt::get(llvm::Type::Int32Ty, + TypeInfo.second/8)); } void AggExprEmitter::EmitAggregateCopy(llvm::Value *DestPtr, @@ -153,14 +151,12 @@ void AggExprEmitter::EmitAggregateCopy(llvm::Value *DestPtr, // FIXME: Handle variable sized types. const llvm::Type *IntPtr = llvm::IntegerType::get(CGF.LLVMPointerWidth); - llvm::Value *MemMoveOps[4] = { - DestPtr, SrcPtr, - // TypeInfo.first describes size in bits. - llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), - llvm::ConstantInt::get(llvm::Type::Int32Ty, TypeInfo.second/8) - }; - - Builder.CreateCall(CGF.CGM.getMemMoveFn(), MemMoveOps, MemMoveOps+4); + Builder.CreateCall4(CGF.CGM.getMemMoveFn(), + DestPtr, SrcPtr, + // TypeInfo.first describes size in bits. + llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), + llvm::ConstantInt::get(llvm::Type::Int32Ty, + TypeInfo.second/8)); } |