aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/ADCE.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-11 01:23:03 +0000
committerChris Lattner <sabre@nondot.org>2007-02-11 01:23:03 +0000
commit6934a04a8c15e9971cd1ea4d5c8df2d7afdd5be5 (patch)
tree23823b269e47b7026c27e2da4eb05b062db0b123 /lib/Transforms/Scalar/ADCE.cpp
parent046800a7125cd497613efc0e1ea15cb595666585 (diff)
Simplify code by using value::takename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 63612768f4..20e4367033 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -189,8 +189,8 @@ bool ADCE::doADCE() {
// The function cannot unwind. Convert it to a call with a branch
// after it to the normal destination.
std::vector<Value*> Args(II->op_begin()+3, II->op_end());
- std::string Name = II->getName(); II->setName("");
- CallInst *NewCall = new CallInst(F, Args, Name, II);
+ CallInst *NewCall = new CallInst(F, Args, "", II);
+ NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
II->replaceAllUsesWith(NewCall);
new BranchInst(II->getNormalDest(), II);