Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 536c3db..47d90e5 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -657,7 +657,7 @@
for (Function::arg_iterator
I = newMain->arg_begin(), E = newMain->arg_end(),
OI = oldMain->arg_begin(); I != E; ++I, ++OI) {
- I->setName(OI->getName()); // Copy argument names from oldMain
+ I->takeName(OI); // Copy argument names from oldMain
args.push_back(I);
}