aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Linker/LinkModules.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp4
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp2
-rw-r--r--lib/Transforms/Utils/CodeExtractor.cpp2
-rw-r--r--tools/bugpoint/Miscompilation.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 7aa169c..a82b266 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->takeName(I); // Copy the name information over...
+ DI->setName(I->getName()); // Copy the name information over...
// Add a mapping to our local map
ValueMap[I] = DI;
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp
index 53473fd..51e2cd8 100644
--- a/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/lib/Transforms/Scalar/LoopRotation.cpp
@@ -226,7 +226,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
// If this instruction is using a value from same basic block then
// update it to use value from cloned instruction.
Instruction *C = In->clone();
- C->takeName(In);
+ C->setName(In->getName());
OrigPreHeader->getInstList().push_back(C);
for (unsigned opi = 0, e = In->getNumOperands(); opi != e; ++opi) {
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp
index a3c58f7..1962c14 100644
--- a/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -179,8 +179,8 @@ BasicBlock *LoopUnroll::FoldBlockIntoPredecessor(BasicBlock *BB) {
BB->eraseFromParent();
// Inherit predecessor's name if it exists...
- if (BB->hasName() && !OnlyPred->hasName())
- OnlyPred->takeName(BB);
+ if (!OldName.empty() && !OnlyPred->hasName())
+ OnlyPred->setName(OldName);
return OnlyPred;
}
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp
index 5d802a6..929d113 100644
--- a/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/lib/Transforms/Scalar/TailDuplication.cpp
@@ -317,7 +317,7 @@ void TailDup::eliminateUnconditionalBranch(BranchInst *Branch) {
//
for (; BI != DestBlock->end(); ++BI) {
Instruction *New = BI->clone();
- New->takeName(BI);
+ New->setName(BI->getName());
SourceBlock->getInstList().push_back(New);
ValueMapping[BI] = New;
}
diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp
index b21683b..5434119 100644
--- a/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/lib/Transforms/Utils/CodeExtractor.cpp
@@ -317,7 +317,7 @@ Function *CodeExtractor::constructFunction(const Values &inputs,
if (!AggregateArgs) {
AI = newFunction->arg_begin();
for (unsigned i = 0, e = inputs.size(); i != e; ++i, ++AI)
- AI->takeName(inputs[i]);
+ AI->setName(inputs[i]->getName());
for (unsigned i = 0, e = outputs.size(); i != e; ++i, ++AI)
AI->setName(outputs[i]->getName()+".out");
}
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 47d90e5..536c3db 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -657,7 +657,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
for (Function::arg_iterator
I = newMain->arg_begin(), E = newMain->arg_end(),
OI = oldMain->arg_begin(); I != E; ++I, ++OI) {
- I->takeName(OI); // Copy argument names from oldMain
+ I->setName(OI->getName()); // Copy argument names from oldMain
args.push_back(I);
}