aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
diff options
context:
space:
mode:
authorJacek Caban <jacek@codeweavers.com>2025-06-13 13:48:29 -0700
committerGitHub <noreply@github.com>2025-06-13 22:48:29 +0200
commitbe5c96bfac328fed548c532bbe1710fe23460a85 (patch)
tree70eaf2803d93bde06770cd2434d8d7067b04f4f0 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
parent60d000496b5485c89c51e64b2b339210d48263be (diff)
downloadllvm-be5c96bfac328fed548c532bbe1710fe23460a85.zip
llvm-be5c96bfac328fed548c532bbe1710fe23460a85.tar.gz
llvm-be5c96bfac328fed548c532bbe1710fe23460a85.tar.bz2
[CodeGen][COFF] Always emit CodeView compiler info on Windows targets (#142970)
MSVC always emits minimal CodeView metadata with compiler information, even when debug info is otherwise disabled. Other tools may rely on this metadata being present. For example, linkers use it to determine whether hotpatching is enabled for the object file.
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index d13b315..5f4f302 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -98,6 +98,10 @@ private:
/// The codeview CPU type used by the translation unit.
codeview::CPUType TheCPU;
+ /// The AsmPrinter used for emitting compiler metadata. When only compiler
+ /// info is being emitted, DebugHandlerBase::Asm may be null.
+ AsmPrinter *CompilerInfoAsm = nullptr;
+
static LocalVarDef createDefRangeMem(uint16_t CVRegister, int Offset);
/// Similar to DbgVariable in DwarfDebug, but not dwarf-specific.