diff options
Diffstat (limited to 'lib/Transforms/IPO/ConstantMerge.cpp')
-rw-r--r-- | lib/Transforms/IPO/ConstantMerge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp index b4bab2d0e7..237e6db1d3 100644 --- a/lib/Transforms/IPO/ConstantMerge.cpp +++ b/lib/Transforms/IPO/ConstantMerge.cpp @@ -72,7 +72,7 @@ bool ConstantMerge::runOnModule(Module &M) { // If this GV is dead, remove it. GV->removeDeadConstantUsers(); - if (GV->use_empty() && GV->hasInternalLinkage()) { + if (GV->use_empty() && GV->hasLocalLinkage()) { GV->eraseFromParent(); continue; } @@ -86,7 +86,7 @@ bool ConstantMerge::runOnModule(Module &M) { if (Slot == 0) { // Nope, add it to the map. Slot = GV; - } else if (GV->hasInternalLinkage()) { // Yup, this is a duplicate! + } else if (GV->hasLocalLinkage()) { // Yup, this is a duplicate! // Make all uses of the duplicate constant use the canonical version. Replacements.push_back(std::make_pair(GV, Slot)); } |