mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user