aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-12-01 07:15:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-12-01 07:15:24 +0000
commitf532c4fc1576578892d22339c8b66bea6c8fb59f (patch)
tree82b8cb4c9fa8b611e4505e2ebacdf0926cc7aa80
parentbe737bb0068741256c50c0b6770d371439d66d49 (diff)
downloadexternal_llvm-f532c4fc1576578892d22339c8b66bea6c8fb59f.zip
external_llvm-f532c4fc1576578892d22339c8b66bea6c8fb59f.tar.gz
external_llvm-f532c4fc1576578892d22339c8b66bea6c8fb59f.tar.bz2
Darwin X86 external weak linkage support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32065 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index cb792ad..f81a33e 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -283,10 +283,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
O << "\t.ascii \" -export:" << *i << "\"\n";
}
- if (Subtarget->isTargetDarwin()) {
- if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
- assert(0 && "External weak linkage for Darwin not implemented yet");
- } else if (Subtarget->isTargetCygwin()) {
+ if (Subtarget->isTargetCygwin()) {
// There is no external weak linkage on Mingw32 platform.
// Defaulting to external
} else {
@@ -296,7 +293,8 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
for (std::set<std::string>::iterator i = ExtWeakSymbols.begin(),
e = ExtWeakSymbols.end();
i != e; ++i) {
- O << "\t.weak " << *i << "\n";
+ O << (Subtarget->isTargetDarwin() ? "\t.weak_reference" : "\t.weak")
+ << " " << *i << "\n";
}
}