[AsmPrinter] fix -disable-debug-info option
authorJameson Nash <vtjnash@gmail.com>
Fri, 13 Nov 2020 04:49:43 +0000 (23:49 -0500)
committerJameson Nash <vtjnash@gmail.com>
Fri, 13 Nov 2020 05:58:09 +0000 (00:58 -0500)
commit9606ef03f03904cec213db031b5ea6fd6052dc5d
tree7c5ae7e1f6dd912c7863b0444d5ebab5052233a1
parent114f0446405a0828037dbc3b5f506f92dd25ab7f
[AsmPrinter] fix -disable-debug-info option

This option was in a rather convoluted place, causing global parameters
to be set in awkward and undesirable ways to try to account for it
indirectly. Add tests for the -disable-debug-info option and ensure we
don't print unintended markers from unintended places.

Reviewed By: dstenb

Differential Revision: https://reviews.llvm.org/D91083
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/CodeGen/Generic/disable-debug-info-print.ll [new file with mode: 0644]