[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 1 12:47:27 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.215 -> 1.216
PPCTargetAsmInfo.cpp updated: 1.8 -> 1.9
---
Log message:
Add weak reference directive.
---
Diffs of the changes: (+8 -5)
PPCAsmPrinter.cpp | 12 +++++++-----
PPCTargetAsmInfo.cpp | 1 +
2 files changed, 8 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.215 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.216
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.215 Fri Dec 1 11:39:22 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Dec 1 14:47:11 2006
@@ -647,11 +647,13 @@
}
}
- if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
- SwitchToDataSection("");
- for (std::set<std::string>::iterator i = ExtWeakSymbols.begin(),
- e = ExtWeakSymbols.end(); i != e; ++i) {
- O << "\t.weak_reference " << *i << "\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;
Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.8 llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.9
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.8 Thu Oct 26 16:48:57 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Fri Dec 1 14:47:11 2006
@@ -33,6 +33,7 @@
StaticCtorsSection = ".mod_init_func";
StaticDtorsSection = ".mod_term_func";
UsedDirective = "\t.no_dead_strip\t";
+ WeakRefDirective = "\t.weak_reference\t";
InlineAsmStart = "# InlineAsm Start";
InlineAsmEnd = "# InlineAsm End";
More information about the llvm-commits
mailing list