aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/IntrinsicLowering.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2007-08-01 03:43:44 +0000
committerDavid Greene <greened@obbligato.org>2007-08-01 03:43:44 +0000
commitb1c4a7b210b9a8aa98fcffae8a84a0a20860ec7a (patch)
tree1c9794c86069c19f235104ec8c2a6f91405552d2 /lib/CodeGen/IntrinsicLowering.cpp
parent1a9e67782d0a837f629e519817b77a657f0bf55f (diff)
downloadexternal_llvm-b1c4a7b210b9a8aa98fcffae8a84a0a20860ec7a.zip
external_llvm-b1c4a7b210b9a8aa98fcffae8a84a0a20860ec7a.tar.gz
external_llvm-b1c4a7b210b9a8aa98fcffae8a84a0a20860ec7a.tar.bz2
New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector. Updates to all clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp
index 8ae4df6..d92ee3f 100644
--- a/lib/CodeGen/IntrinsicLowering.cpp
+++ b/lib/CodeGen/IntrinsicLowering.cpp
@@ -53,8 +53,8 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI,
FunctionType::get(RetTy, ParamTys, false));
}
- SmallVector<Value*, 8> Operands(ArgBegin, ArgEnd);
- CallInst *NewCI = new CallInst(FCache, &Operands[0], Operands.size(),
+ SmallVector<Value *, 8> Args(ArgBegin, ArgEnd);
+ CallInst *NewCI = new CallInst(FCache, Args.begin(), Args.end(),
CI->getName(), CI);
if (!CI->use_empty())
CI->replaceAllUsesWith(NewCI);
@@ -421,7 +421,7 @@ static Instruction *LowerPartSelect(CallInst *CI) {
CI->getOperand(2),
CI->getOperand(3)
};
- return new CallInst(F, Args, sizeof(Args)/sizeof(Args[0]), CI->getName(), CI);
+ return new CallInst(F, Args, Args+sizeof(Args)/sizeof(Args[0]), CI->getName(), CI);
}
/// Convert the llvm.part.set.iX.iY.iZ intrinsic. This intrinsic takes
@@ -587,7 +587,7 @@ static Instruction *LowerPartSet(CallInst *CI) {
CI->getOperand(3),
CI->getOperand(4)
};
- return new CallInst(F, Args, sizeof(Args)/sizeof(Args[0]), CI->getName(), CI);
+ return new CallInst(F, Args, Args+sizeof(Args)/sizeof(Args[0]), CI->getName(), CI);
}