diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index 70b7135fcbef0..bd0dfed76e3d4 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -548,6 +548,7 @@ void LTOCodeGenerator::verifyMergedModuleOnce() { report_fatal_error("Broken module found, compilation aborted!"); if (BrokenDebugInfo) { emitWarning("Invalid debug info found, debug info will be stripped"); + emitWarning("Source FileName: " + MergedModule->getSourceFileName()); StripDebugInfo(*MergedModule); } } diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index 42dba0abe245f..5c4883c8ddae9 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -182,6 +182,8 @@ static void verifyLoadedModule(Module &TheModule) { if (BrokenDebugInfo) { TheModule.getContext().diagnose(ThinLTODiagnosticInfo( "Invalid debug info found, debug info will be stripped", DS_Warning)); + TheModule.getContext().diagnose(ThinLTODiagnosticInfo( + "Source File Name: " + TheModule.getSourceFileName(), DS_Warning)); StripDebugInfo(TheModule); } }