From 046800a7125cd497613efc0e1ea15cb595666585 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 11 Feb 2007 01:08:35 +0000 Subject: simplify name juggling through the use of Value::takeName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34175 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/PruneEH.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/IPO/PruneEH.cpp') 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(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(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 -- cgit v1.2.3