Rely on a single DWARF version instead of having two copies
authorGreg Clayton <gclayton@apple.com>
Wed, 23 Nov 2016 23:30:37 +0000 (23:30 +0000)
committerGreg Clayton <gclayton@apple.com>
Wed, 23 Nov 2016 23:30:37 +0000 (23:30 +0000)
commite65439797a89161e791fb0d1795a1a8dfe95849b
tree2468b98093128348dd384ce409286b80b290ddf3
parent570e39a25ca345e3facaea16b2facefddfb3aa92
Rely on a single DWARF version instead of having two copies

This patch makes AsmPrinter less reliant on DwarfDebug by relying on the DWARF version in the AsmPrinter's MCStreamer's MCContext. This allows us to remove the redundant DWARF version from DwarfDebug. It also lets us change code that used to access the AsmPrinter's DwarfDebug just to get to the DWARF version by changing the DWARF version accessor on AsmPrinter so that it grabs the version from its MCStreamer's MCContext.

Differential Revision: https://reviews.llvm.org/D27032

llvm-svn: 287839
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp