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 | a17d2e5c216d9534a8f007a5e9f52c212452dfc8 (patch) | |
| tree | 93ccefef180c65c1820c5539747cf404f4b23ff5 /llvm/lib | |
| parent | 4e7dfafc03188ad9e14e9c3c2b8039224792c5b7 (diff) | |
| download | bcm5719-llvm-a17d2e5c216d9534a8f007a5e9f52c212452dfc8.tar.gz bcm5719-llvm-a17d2e5c216d9534a8f007a5e9f52c212452dfc8.zip | |
don't call SectionForGlobal on declarations, you can't tell the section a
declaration will end up in.
llvm-svn: 77843
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp index ea4515696a5..f0e4cbaae6a 100644 --- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp +++ b/llvm/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); |

