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
This commit is contained in:
Chris Lattner 2006-12-21 22:59:58 +00:00
parent 282d8c166f
commit 1a199de813

View File

@ -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);