diff options
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r-- | lib/Target/PIC16/PIC16AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.cpp b/lib/Target/PIC16/PIC16AsmPrinter.cpp index ea45156..f0e4cba 100644 --- a/lib/Target/PIC16/PIC16AsmPrinter.cpp +++ b/lib/Target/PIC16/PIC16AsmPrinter.cpp @@ -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); |