summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-06 00:56:42 +0000
committerChris Lattner <sabre@nondot.org>2008-05-06 00:56:42 +0000
commitdbcc2ca6b2d6893ec6f1c7b8ec9d94b35f02852c (patch)
treef73c4b9cfd88c4583900322c4383740d23289d98 /clang/lib/CodeGen/CGExprAgg.cpp
parent38dc08f36f14ae14bab7317511ad0d7f40983347 (diff)
downloadbcm5719-llvm-dbcc2ca6b2d6893ec6f1c7b8ec9d94b35f02852c.tar.gz
bcm5719-llvm-dbcc2ca6b2d6893ec6f1c7b8ec9d94b35f02852c.zip
simplify some builder calls.
llvm-svn: 50694
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index f91c39253ca..508bf753832 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -330,14 +330,10 @@ void AggExprEmitter::EmitNullInitializationToLValue(LValue LV, QualType T) {
const llvm::Type *BP = llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
llvm::Value* DestPtr = Builder.CreateBitCast(LV.getAddress(), BP, "tmp");
-
- llvm::Value *MemSetOps[4] = {
- DestPtr, llvm::ConstantInt::get(llvm::Type::Int8Ty, 0),
- llvm::ConstantInt::get(llvm::Type::Int64Ty, Size/8),
- llvm::ConstantInt::get(llvm::Type::Int32Ty, 0)
- };
-
- Builder.CreateCall(MemSet, MemSetOps, MemSetOps+4);
+ Builder.CreateCall4(MemSet, DestPtr,
+ llvm::ConstantInt::get(llvm::Type::Int8Ty, 0),
+ llvm::ConstantInt::get(llvm::Type::Int64Ty, Size/8),
+ llvm::ConstantInt::get(llvm::Type::Int32Ty, 0));
}
}
OpenPOWER on IntegriCloud