don't call SectionForGlobal on declarations, you can't tell the section a

declaration will end up in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-08-02 01:02:43 +00:00
parent 80ec2792b2
commit 6f411dfad9

View File

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