diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-02 01:02:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-02 01:02:43 +0000 |
commit | 6f411dfad902a8729363eec8486590542ec2976c (patch) | |
tree | 68f304434b4c7c72e615ca087d2bb06e58265e20 /lib/Target/PIC16 | |
parent | 80ec2792b2b271eca55743a3cc4c8bca214fa705 (diff) | |
download | external_llvm-6f411dfad902a8729363eec8486590542ec2976c.zip external_llvm-6f411dfad902a8729363eec8486590542ec2976c.tar.gz external_llvm-6f411dfad902a8729363eec8486590542ec2976c.tar.bz2 |
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
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); |