aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Bytecode/Reader/Reader.cpp2
-rw-r--r--lib/Transforms/LevelRaise.cpp2
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 0b3cadf085..7eede0e1d4 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -1063,7 +1063,7 @@ void BytecodeReader::ParseSymbolTable(Function *CurrentFunction,
}
if (V == 0)
error("Failed value look-up for name '" + Name + "'");
- V->setName(Name, ST);
+ V->setName(Name);
}
}
}
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index ebd9829b4c..a3b8a9b64d 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/lib/Transforms/LevelRaise.cpp
@@ -253,7 +253,7 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
if (!Src->hasName() && CI->hasName()) {
std::string Name = CI->getName();
CI->setName("");
- Src->setName(Name, &BB->getParent()->getSymbolTable());
+ Src->setName(Name);
}
// DCE the instruction now, to avoid having the iterative version of DCE
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp
index ab315b6b75..bf1e3612b2 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -34,9 +34,9 @@ void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL,
// Delete the unnecessary instruction now...
BI = BIL.erase(BI);
- // Make sure to propagate a name if there is one already...
- if (OldName.size() && !V->hasName())
- V->setName(OldName, &BIL.getParent()->getSymbolTable());
+ // Make sure to propagate a name if there is one already.
+ if (!OldName.empty() && !V->hasName())
+ V->setName(OldName);
}