From 0ea0399411fe44efc99f29618e7c275aa0d2493b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 31 Jul 2006 20:38:13 +0000 Subject: [PATCH] handle GlobalValue::InternalLinkage in doFinalization llvm-svn: 29417 --- lib/Target/ARM/ARMAsmPrinter.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index a78e54d0e99..91d7d70d6fd 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -207,8 +207,16 @@ bool ARMAsmPrinter::doFinalization(Module &M) { unsigned Size = TD->getTypeSize(C->getType()); unsigned Align = TD->getTypeAlignment(C->getType()); - assert (I->getLinkage() == GlobalValue::ExternalLinkage); - O << "\t.globl " << name << "\n"; + switch (I->getLinkage()) { + default: + assert(0 && "Unknown linkage type!"); + break; + case GlobalValue::ExternalLinkage: + O << "\t.globl " << name << "\n"; + break; + case GlobalValue::InternalLinkage: + break; + } assert (!C->isNullValue()); SwitchToDataSection(".data", I);