summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/PruneEH.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-13 02:10:56 +0000
committerChris Lattner <sabre@nondot.org>2007-02-13 02:10:56 +0000
commit93e985f1b17aef62d58e3198a4604f9f6cfe8d19 (patch)
tree899bcfb30d336050773f4d3e4637c393d8535b61 /lib/Transforms/IPO/PruneEH.cpp
parente433919686aee9c95207d93d85aeaca68a5b2546 (diff)
downloadllvm-93e985f1b17aef62d58e3198a4604f9f6cfe8d19.tar.gz
llvm-93e985f1b17aef62d58e3198a4604f9f6cfe8d19.tar.bz2
llvm-93e985f1b17aef62d58e3198a4604f9f6cfe8d19.tar.xz
Eliminate use of ctors that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 271a8fa0d0..6040379d58 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -22,6 +22,7 @@
#include "llvm/Intrinsics.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/CallGraph.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
@@ -144,11 +145,10 @@ bool PruneEH::SimplifyFunction(Function *F) {
if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
if (Function *F = II->getCalledFunction())
if (DoesNotUnwind.count(CG[F])) {
+ SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
// Insert a call instruction before the invoke.
CallInst *Call = new CallInst(II->getCalledValue(),
- std::vector<Value*>(II->op_begin()+3,
- II->op_end()),
- "", II);
+ &Args[0], Args.size(), "", II);
Call->takeName(II);
Call->setCallingConv(II->getCallingConv());