aboutsummaryrefslogtreecommitdiff
path: root/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
commit3eae03e7d165f20a863a9a4d7122ba2a691ab16d (patch)
tree554dccbeb553969c3eea861af27fdea21bd72447 /lib/CodeGen/CGExprAgg.cpp
parent72cefca3e196ba4e6b4f2c3a46c1a9fbf6d0894a (diff)
simplify some builder calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index f91c39253c..508bf75383 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/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));
}
}