mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-03 02:31:26 +00:00
Don't internalize available_externally functions. We already did the right
thing for variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6ca55370d2
commit
1b5ec068f5
@ -126,6 +126,8 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
// FIXME: maybe use private linkage?
|
||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||
if (!I->isDeclaration() && // Function must be defined here
|
||||
// Available externally is really just a "declaration with a body".
|
||||
!I->hasAvailableExternallyLinkage() &&
|
||||
!I->hasLocalLinkage() && // Can't already have internal linkage
|
||||
!ExternalNames.count(I->getName())) {// Not marked to keep external?
|
||||
I->setLinkage(GlobalValue::InternalLinkage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user