aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}