diff options
Diffstat (limited to 'lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index d6043a1df5..271a8fa0d0 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -144,12 +144,12 @@ bool PruneEH::SimplifyFunction(Function *F) { if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) if (Function *F = II->getCalledFunction()) if (DoesNotUnwind.count(CG[F])) { - // Insert a call instruction before the invoke... - std::string Name = II->getName(); II->setName(""); + // Insert a call instruction before the invoke. CallInst *Call = new CallInst(II->getCalledValue(), std::vector<Value*>(II->op_begin()+3, II->op_end()), - Name, II); + "", II); + Call->takeName(II); Call->setCallingConv(II->getCallingConv()); // Anything that used the value produced by the invoke instruction |