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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Added some clarifying comment.
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
259 | Look at all of the code to see how this local DwarfVersion already was being stored into the MCStreamer's MCContext. |
Comment Actions
Thanks!
(for posterity/others: No idea if AsmPrinter having any knowledge of DwarfDebug/DwarfVersion is the right layering - but this change seems no worse & handy for other DWARF generation code in llvm-dsymutil, unit testing, etc)
Look at all of the code to see how this local DwarfVersion already was being stored into the MCStreamer's MCContext.