Emit unused EH frames for weak definitions on Darwin,
because assembler/linker can't cope with weak absolutes.
PR 1880.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45811 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 6bfc326..a872778 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -76,8 +76,8 @@
     SetDirective = "\t.set";
     PCSymbol = ".";
     UsedDirective = "\t.no_dead_strip\t";
-    WeakDefDirective = "\t.weak_definition\t";
-    WeakRefDirective = "\t.weak_reference\t";
+    WeakDefDirective = "\t.weak_definition ";
+    WeakRefDirective = "\t.weak_reference ";
     HiddenDirective = "\t.private_extern\t";
     
     // In non-PIC modes, emit a special label before jump tables so that the
@@ -93,7 +93,6 @@
     DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
     DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
     DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
-    GlobalEHDirective = "\t.globl\t";
     DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
     DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
     DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
@@ -105,6 +104,8 @@
     // Exceptions handling
     if (!Subtarget->is64Bit())
       SupportsExceptionHandling = true;
+    GlobalEHDirective = "\t.globl\t";
+    SupportsWeakOmittedEHFrame = false;
     AbsoluteEHSectionOffsets = false;
     DwarfEHFrameSection =
     ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";