Simplify code by using value::takename

llvm-svn: 34176
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 6361276..20e4367 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -189,8 +189,8 @@
           // 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);