From: Chris Lattner Date: Thu, 21 Dec 2006 22:59:58 +0000 (+0000) Subject: Fix for ARM weak symbols, patch by Lauro Ramos Venancio! X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1a199de81322a844faee0ea242f68fe326bbd885;p=oota-llvm.git Fix for ARM weak symbols, patch by Lauro Ramos Venancio! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32740 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index d4c6634214a..653d5007ab9 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -111,6 +111,20 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Print out constants referenced by the function EmitConstantPool(MF.getConstantPool()); + const std::vector + &CP = MF.getConstantPool()->getConstants(); + for (unsigned i = 0, e = CP.size(); i != e; ++i) { + MachineConstantPoolEntry CPE = CP[i]; + if (!CPE.isMachineConstantPoolEntry()){ + Constant *CV = CPE.Val.ConstVal; + if (const GlobalValue *GV = dyn_cast(CV)) { + if (GV->hasExternalWeakLinkage()) { + ExtWeakSymbols.insert(GV); + } + } + } + } + // Print out jump tables referenced by the function EmitJumpTableInfo(MF.getJumpTableInfo(), MF);