summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-21 22:59:58 +0000
committerChris Lattner <sabre@nondot.org>2006-12-21 22:59:58 +0000
commit1a199de81322a844faee0ea242f68fe326bbd885 (patch)
tree041d0361c368a9ebc89e48701469bb8ae8c07945 /lib
parent282d8c166f5da5b23fb60f21d45ef9db441220ed (diff)
downloadllvm-1a199de81322a844faee0ea242f68fe326bbd885.tar.gz
llvm-1a199de81322a844faee0ea242f68fe326bbd885.tar.bz2
llvm-1a199de81322a844faee0ea242f68fe326bbd885.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index d4c6634214..653d5007ab 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<MachineConstantPoolEntry>
+ &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<GlobalValue>(CV)) {
+ if (GV->hasExternalWeakLinkage()) {
+ ExtWeakSymbols.insert(GV);
+ }
+ }
+ }
+ }
+
// Print out jump tables referenced by the function
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);