summaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-12-07 00:57:25 +0000
committerDavide Italiano <davide@freebsd.org>2017-12-07 00:57:25 +0000
commit01e7a568cd08b0167ea47964276c1180a01045ac (patch)
tree435700843d82d2455d0981f1f8ec6766686df427 /lib/MC
parent9c87911e89bd37a1f8c579b8dd4779d164da7688 (diff)
[MC/Dwarf] Use the older DWARF linetables format on Darwin.
dsymutil doesn't yet understand the new format and the change, among others, breaks a large fraction of the debugger tests on mac OS. rdar://problem/35856354 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCDwarf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index 32e7cd4f909..bda0ec14599 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -338,7 +338,10 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
MakeStartMinusEndExpr(*MCOS, *LineStartSym, *LineEndSym, 4), 4);
// Next 2 bytes is the Version.
+ // FIXME: On Darwin we still default to V2.
unsigned LineTableVersion = context.getDwarfVersion();
+ if (context.getObjectFileInfo()->getTargetTriple().isOSDarwin())
+ LineTableVersion = 2;
MCOS->EmitIntValue(LineTableVersion, 2);
// Keep track of the bytes between the very start and where the header length