diff options
author | David Greene <greened@obbligato.org> | 2007-08-01 03:43:44 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-08-01 03:43:44 +0000 |
commit | b1c4a7b210b9a8aa98fcffae8a84a0a20860ec7a (patch) | |
tree | 1c9794c86069c19f235104ec8c2a6f91405552d2 /lib/Transforms/Utils/LowerInvoke.cpp | |
parent | 1a9e67782d0a837f629e519817b77a657f0bf55f (diff) | |
download | external_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/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index d72c018..551ca7f 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -212,7 +212,7 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) { std::vector<Value*> CallArgs(II->op_begin()+3, II->op_end()); // Insert a normal call instruction... CallInst *NewCall = new CallInst(II->getCalledValue(), - &CallArgs[0], CallArgs.size(), "", II); + CallArgs.begin(), CallArgs.end(), "", II); NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); II->replaceAllUsesWith(NewCall); @@ -269,7 +269,7 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, // Insert a normal call instruction. std::vector<Value*> CallArgs(II->op_begin()+3, II->op_end()); CallInst *NewCall = new CallInst(II->getCalledValue(), - &CallArgs[0], CallArgs.size(), "", + CallArgs.begin(), CallArgs.end(), "", II); NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); @@ -542,7 +542,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) { Idx.push_back(ConstantInt::get(Type::Int32Ty, 0)); Idx[0] = new GetElementPtrInst(BufPtr, &Idx[0], 2, "JmpBuf", UnwindBlock); Idx[1] = ConstantInt::get(Type::Int32Ty, 1); - new CallInst(LongJmpFn, &Idx[0], Idx.size(), "", UnwindBlock); + new CallInst(LongJmpFn, Idx.begin(), Idx.end(), "", UnwindBlock); new UnreachableInst(UnwindBlock); // Set up the term block ("throw without a catch"). |