Don't call SectionForGlobal for hasAvailableExternallyLinkage()

variables either.

llvm-svn: 77844
This commit is contained in:
Dan Gohman 2009-08-02 01:18:44 +00:00
parent a17d2e5c21
commit 321dc97adf
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ bool PIC16AsmPrinter::doInitialization(Module &M) {
// Set the section names for all globals. // Set the section names for all globals.
for (Module::global_iterator I = M.global_begin(), E = M.global_end(); for (Module::global_iterator I = M.global_begin(), E = M.global_end();
I != E; ++I) I != E; ++I)
if (!I->isDeclaration()) if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage())
I->setSection(getObjFileLowering(). I->setSection(getObjFileLowering().
SectionForGlobal(I, Mang,TM)->getName()); SectionForGlobal(I, Mang,TM)->getName());