mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
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:
parent
80ec2792b2
commit
6f411dfad9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user