diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:37:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:37:51 +0000 |
| commit | 8dd4cae4f8816e3c498bbb2efdf4edf03d229bff (patch) | |
| tree | bbcf2b9eff048590e8a22fc1fbfcf16fb6c6c461 /llvm/lib/Transforms/Utils/LowerInvoke.cpp | |
| parent | 6e0123b17f519377e277281cf9e7a70c1b1dbb96 (diff) | |
| download | bcm5719-llvm-8dd4cae4f8816e3c498bbb2efdf4edf03d229bff.tar.gz bcm5719-llvm-8dd4cae4f8816e3c498bbb2efdf4edf03d229bff.zip | |
simplify code by using Value::takeName
llvm-svn: 34177
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerInvoke.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerInvoke.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index 62eec75160a..0da30e2428a 100644 --- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp @@ -201,10 +201,10 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) { for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) { // Insert a normal call instruction... - std::string Name = II->getName(); II->setName(""); CallInst *NewCall = new CallInst(II->getCalledValue(), std::vector<Value*>(II->op_begin()+3, - II->op_end()), Name, II); + II->op_end()), "", II); + NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); II->replaceAllUsesWith(NewCall); @@ -258,11 +258,11 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, CatchSwitch->addCase(InvokeNoC, II->getUnwindDest()); // Insert a normal call instruction. - std::string Name = II->getName(); II->setName(""); CallInst *NewCall = new CallInst(II->getCalledValue(), std::vector<Value*>(II->op_begin()+3, - II->op_end()), Name, + II->op_end()), "", II); + NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); II->replaceAllUsesWith(NewCall); |

