diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-12-21 22:59:58 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-12-21 22:59:58 +0000 |
| commit | 5cfa5ef91267b0a5d3c59b693df8c7fd5448edc0 (patch) | |
| tree | a414c148dfd76042cc283810a123e2ef1a4f065b /llvm/lib | |
| parent | b68935a947b6837ba7e133aab93d7af3149341b2 (diff) | |
| download | bcm5719-llvm-5cfa5ef91267b0a5d3c59b693df8c7fd5448edc0.tar.gz bcm5719-llvm-5cfa5ef91267b0a5d3c59b693df8c7fd5448edc0.zip | |
Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
llvm-svn: 32740
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index d4c6634214a..653d5007ab9 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/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); |

