mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +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:
@@ -63,7 +63,7 @@ bool GlobalDCE::runOnModule(Module &M) {
|
||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
|
||||
Changed |= RemoveUnusedGlobalValue(*I);
|
||||
// Functions with external linkage are needed if they have a body
|
||||
if ((!I->hasInternalLinkage() && !I->hasLinkOnceLinkage()) &&
|
||||
if ((!I->hasLocalLinkage() && !I->hasLinkOnceLinkage()) &&
|
||||
!I->isDeclaration())
|
||||
GlobalIsNeeded(I);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ bool GlobalDCE::runOnModule(Module &M) {
|
||||
Changed |= RemoveUnusedGlobalValue(*I);
|
||||
// Externally visible & appending globals are needed, if they have an
|
||||
// initializer.
|
||||
if ((!I->hasInternalLinkage() && !I->hasLinkOnceLinkage()) &&
|
||||
if ((!I->hasLocalLinkage() && !I->hasLinkOnceLinkage()) &&
|
||||
!I->isDeclaration())
|
||||
GlobalIsNeeded(I);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user