[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp

Chris Lattner sabre at nondot.org
Thu Dec 21 15:00:14 PST 2006



Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.41 -> 1.42
---
Log message:

Fix for ARM weak symbols, patch by Lauro Ramos Venancio!


---
Diffs of the changes:  (+14 -0)

 ARMAsmPrinter.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.41 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.42
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.41	Tue Dec 19 16:59:25 2006
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp	Thu Dec 21 16:59:58 2006
@@ -111,6 +111,20 @@
   // 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);
 






More information about the llvm-commits mailing list