summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-02 01:02:43 +0000
committerChris Lattner <sabre@nondot.org>2009-08-02 01:02:43 +0000
commita17d2e5c216d9534a8f007a5e9f52c212452dfc8 (patch)
tree93ccefef180c65c1820c5539747cf404f4b23ff5 /llvm/lib
parent4e7dfafc03188ad9e14e9c3c2b8039224792c5b7 (diff)
downloadbcm5719-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.cpp4
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);
OpenPOWER on IntegriCloud