summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit23b3f6da1480abd6ce6aefcc3b72d0438e73375d (patch)
treeab900e9d3a8b0de6297ed01f7d430820e4a0e6ed /llvm/lib/MC
parent4626c9a647f6bdabf236fe3aa70b314cd7fdbbd5 (diff)
downloadbcm5719-llvm-23b3f6da1480abd6ce6aefcc3b72d0438e73375d.tar.gz
bcm5719-llvm-23b3f6da1480abd6ce6aefcc3b72d0438e73375d.zip
[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 llvm-svn: 319995
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 32e7cd4f909..bda0ec14599 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud