[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sun Dec 17 19:37:36 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.221 -> 1.222
---
Log message:
move ExtWeakSymbols to AsmPrinter
---
Diffs of the changes: (+3 -15)
PPCAsmPrinter.cpp | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.221 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.222
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.221 Tue Dec 12 14:57:08 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Sun Dec 17 21:37:18 2006
@@ -50,9 +50,6 @@
struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter {
std::set<std::string> FnStubs, GVStubs;
const PPCSubtarget &Subtarget;
-
- // Necessary for external weak linkage support
- std::set<std::string> ExtWeakSymbols;
PPCAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
: AsmPrinter(O, TM, T), Subtarget(TM.getSubtarget<PPCSubtarget>()) {
@@ -162,7 +159,7 @@
FnStubs.insert(Name);
O << "L" << Name << "$stub";
if (GV->hasExternalWeakLinkage())
- ExtWeakSymbols.insert(Name);
+ ExtWeakSymbols.insert(GV);
return;
}
}
@@ -337,7 +334,7 @@
O << Name;
if (GV->hasExternalWeakLinkage())
- ExtWeakSymbols.insert(Name);
+ ExtWeakSymbols.insert(GV);
return;
}
@@ -658,22 +655,13 @@
// reference!
if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
if (GV->hasExternalWeakLinkage())
- ExtWeakSymbols.insert(Mang->getValueName(GV));
+ ExtWeakSymbols.insert(GV);
EmitGlobalConstant(C);
O << '\n';
}
}
- if (TAI->getWeakRefDirective()) {
- if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
- SwitchToDataSection("");
- for (std::set<std::string>::iterator i = ExtWeakSymbols.begin(),
- e = ExtWeakSymbols.end(); i != e; ++i) {
- O << TAI->getWeakRefDirective() << *i << "\n";
- }
- }
-
bool isPPC64 = TD->getPointerSizeInBits() == 64;
// Output stubs for dynamically-linked functions
More information about the llvm-commits
mailing list