summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2014-05-01 08:46:02 +0000
committerOliver Stannard <oliver.stannard@arm.com>2014-05-01 08:46:02 +0000
commit7eacbd5a7105e9620e061a20143bdd0c6c5d6f99 (patch)
tree9f27a7bea3a1a69140c9cd4c387a45f07f1aeb6e /llvm/lib/MC/MCDwarf.cpp
parentf01ce1990c4305d62db34f03c3fb3c69a08f15e5 (diff)
downloadbcm5719-llvm-7eacbd5a7105e9620e061a20143bdd0c6c5d6f99.tar.gz
bcm5719-llvm-7eacbd5a7105e9620e061a20143bdd0c6c5d6f99.zip
Record the DWARF version in MCContext
Record the DWARF version in MCContext, and use it when emitting the dwarf version into the debug info. llvm-svn: 207739
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 8c9f15af18f..7481e45c596 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -645,8 +645,8 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
const MCExpr *Length = MakeStartMinusEndExpr(*MCOS, *InfoStart, *InfoEnd, 4);
MCOS->EmitAbsValue(Length, 4);
- // The 2 byte DWARF version, which is 2.
- MCOS->EmitIntValue(2, 2);
+ // The 2 byte DWARF version.
+ MCOS->EmitIntValue(context.getDwarfVersion(), 2);
// The 4 byte offset to the debug abbrevs from the start of the .debug_abbrev,
// it is at the start of that section so this is zero.
OpenPOWER on IntegriCloud