diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-07-26 13:10:08 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 13:10:08 +0400 |
commit | 63e1647827f3427c5f3ad37461d84a63ba5fcdaf (patch) | |
tree | a0c9d1914ab82081e3245aebbbee1fff0dbfdcaa /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 4ce3993ee2b6ee883ef62100df68db9e10ef1dc9 (diff) | |
download | llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.zip llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.tar.gz llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.tar.bz2 |
CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)
This avoids another unserializable field. Move the DbgInfoAvailable
field into the AsmPrinter, which is only really a cache/convenience
bit for checking a direct IR module metadata check.
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index dddc08b..7700ffd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -613,7 +613,7 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { void CodeViewDebug::beginModule(Module *M) { // If module doesn't have named metadata anchors or COFF debug section // is not available, skip any debug info related stuff. - if (!MMI->hasDebugInfo() || + if (!Asm->hasDebugInfo() || !Asm->getObjFileLowering().getCOFFDebugSymbolsSection()) { Asm = nullptr; return; @@ -636,7 +636,7 @@ void CodeViewDebug::beginModule(Module *M) { } void CodeViewDebug::endModule() { - if (!Asm || !MMI->hasDebugInfo()) + if (!Asm || !Asm->hasDebugInfo()) return; // The COFF .debug$S section consists of several subsections, each starting |