aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-04-13 19:15:17 +0000
committerOwen Anderson <resistor@mac.com>2008-04-13 19:15:17 +0000
commit386ea355e730a1e92acf84e7a3f2ad95c3d6165b (patch)
treedb0f8b4f971bfe783a270cd59caa66856dba6fa1 /lib/Linker
parent4a6da60787fcc66c521288fbd139cf8afdca5957 (diff)
downloadexternal_llvm-386ea355e730a1e92acf84e7a3f2ad95c3d6165b.zip
external_llvm-386ea355e730a1e92acf84e7a3f2ad95c3d6165b.tar.gz
external_llvm-386ea355e730a1e92acf84e7a3f2ad95c3d6165b.tar.bz2
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
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index a82b266..7aa169c 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -930,7 +930,7 @@ static bool LinkFunctionBody(Function *Dest, Function *Src,
Function::arg_iterator DI = Dest->arg_begin();
for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end();
I != E; ++I, ++DI) {
- DI->setName(I->getName()); // Copy the name information over...
+ DI->takeName(I); // Copy the name information over...
// Add a mapping to our local map
ValueMap[I] = DI;