diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:08:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:08:35 +0000 |
commit | 046800a7125cd497613efc0e1ea15cb595666585 (patch) | |
tree | d786e1415ddb69b8a0d8f8b8f71856081f10aea4 /lib/Transforms/IPO/PruneEH.cpp | |
parent | f41916e75dc9c622fa81b91eb6a5e0a36fa13754 (diff) | |
download | llvm-046800a7125cd497613efc0e1ea15cb595666585.tar.gz llvm-046800a7125cd497613efc0e1ea15cb595666585.tar.bz2 llvm-046800a7125cd497613efc0e1ea15cb595666585.tar.xz |
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
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 |