[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp X86TargetAsmInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 1 12:47:28 PST 2006
Changes in directory llvm/lib/Target/X86:
X86AsmPrinter.cpp updated: 1.218 -> 1.219
X86TargetAsmInfo.cpp updated: 1.11 -> 1.12
---
Log message:
Add weak reference directive.
---
Diffs of the changes: (+4 -6)
X86AsmPrinter.cpp | 8 ++------
X86TargetAsmInfo.cpp | 2 ++
2 files changed, 4 insertions(+), 6 deletions(-)
Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.218 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.219
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.218 Fri Dec 1 03:10:28 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp Fri Dec 1 14:47:11 2006
@@ -278,16 +278,12 @@
O << "\t.ascii \" -export:" << *i << "\"\n";
}
- if (!Subtarget->isTargetCygwin()) {
- // There is no external weak linkage on Mingw32 platform.
- // Defaulting to external
+ 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 << (Subtarget->isTargetDarwin() ? "\t.weak_reference" : "\t.weak")
- << " " << *i << "\n";
+ O << TAI->getWeakRefDirective() << *i << "\n";
}
}
Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp
diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.11 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.12
--- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.11 Tue Nov 28 19:48:01 2006
+++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Fri Dec 1 14:47:11 2006
@@ -62,6 +62,7 @@
InlineAsmEnd = "# InlineAsm End";
SetDirective = "\t.set";
UsedDirective = "\t.no_dead_strip\t";
+ WeakRefDirective = "\t.weak_reference\t";
NeedsSet = true;
DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
@@ -86,6 +87,7 @@
// HasDotFile - True if target asm supports .file directives.
// bool HasDotFile; // Defaults to false.
PrivateGlobalPrefix = "."; // Prefix for private global symbols
+ WeakRefDirective = "\t.weak\t";
DwarfRequiresFrameSection = false;
DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits";
DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits";
More information about the llvm-commits
mailing list