@@ -611,8 +611,7 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) {
611611}
612612
613613void CodeViewDebug::beginModule (Module *M) {
614- // If module doesn't have named metadata anchors or COFF debug section
615- // is not available, skip any debug info related stuff.
614+ // If COFF debug section is not available, skip any debug info related stuff.
616615 if (!Asm->getObjFileLowering ().getCOFFDebugSymbolsSection ()) {
617616 Asm = nullptr ;
618617 return ;
@@ -633,9 +632,9 @@ void CodeViewDebug::beginModule(Module *M) {
633632 const auto *CU = cast<DICompileUnit>(Node);
634633
635634 CurrentSourceLanguage = MapDWLangToCVLang (CU->getSourceLanguage ());
636- NoDebug =
635+ OnlyCompilerInfo =
637636 !M->getCodeViewFlag () || CU->getEmissionKind () == DICompileUnit::NoDebug;
638- if (NoDebug )
637+ if (OnlyCompilerInfo )
639638 return ;
640639
641640 collectGlobalVariableInfo ();
@@ -663,7 +662,7 @@ void CodeViewDebug::endModule() {
663662 emitObjName ();
664663 emitCompilerInformation ();
665664 endCVSubsection (CompilerInfo);
666- if (NoDebug )
665+ if (OnlyCompilerInfo )
667666 return ;
668667
669668 emitInlineeLinesSubsection ();
@@ -1453,7 +1452,7 @@ void CodeViewDebug::collectVariableInfo(const DISubprogram *SP) {
14531452}
14541453
14551454void CodeViewDebug::beginFunctionImpl (const MachineFunction *MF) {
1456- if (NoDebug )
1455+ if (OnlyCompilerInfo )
14571456 return ;
14581457
14591458 const TargetSubtargetInfo &TSI = MF->getSubtarget ();
@@ -3047,7 +3046,7 @@ void CodeViewDebug::collectLexicalBlockInfo(
30473046}
30483047
30493048void CodeViewDebug::endFunctionImpl (const MachineFunction *MF) {
3050- if (NoDebug )
3049+ if (OnlyCompilerInfo )
30513050 return ;
30523051
30533052 const Function &GV = MF->getFunction ();
@@ -3108,7 +3107,7 @@ static bool isUsableDebugLoc(DebugLoc DL) {
31083107
31093108void CodeViewDebug::beginInstruction (const MachineInstr *MI) {
31103109 DebugHandlerBase::beginInstruction (MI);
3111- if (NoDebug )
3110+ if (OnlyCompilerInfo )
31123111 return ;
31133112
31143113 // Ignore DBG_VALUE and DBG_LABEL locations and function prologue.
0 commit comments