diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index 0b3cadf0859..7eede0e1d4d 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 ebd9829b4c0..a3b8a9b64d8 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 ab315b6b756..bf1e3612b26 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); }