MachineModuleInfo: Don't allow dynamically setting DbgInfoAvailable
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 17 Apr 2022 16:55:24 +0000 (12:55 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 20 Apr 2022 01:08:37 +0000 (21:08 -0400)
commit9592e88f59cfd399e9285cfec50a23675f43a43a
treea5f641a88fbb2a68e047d7a56e4a3caf9a56e151
parent9a519179d9efcde3eb8e1808258de1f0d637e990
MachineModuleInfo: Don't allow dynamically setting DbgInfoAvailable

This can be set up front, and used only as a cache. This avoids a
field that looks like it requires MIR serialization.

I believe this fixes 2 bugs for CodeView. First, this addresses a
FIXME that the flag -diable-debug-info-print only works with
DWARF. Second, it fixes emitting debug info with emissionKind NoDebug.
llvm/include/llvm/CodeGen/MachineModuleInfo.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/MachineModuleInfo.cpp
llvm/test/CodeGen/X86/disable-debug-info-print-codeview.ll [new file with mode: 0644]
llvm/test/DebugInfo/COFF/emission-kind-no-debug.ll [new file with mode: 0644]
llvm/test/DebugInfo/COFF/language.ll