[llvm] r335647 - [Debugify] Don't treat missing dbg.values as an error (PR37942)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 11:54:10 PDT 2018
Author: vedantk
Date: Tue Jun 26 11:54:10 2018
New Revision: 335647
URL: http://llvm.org/viewvc/llvm-project?rev=335647&view=rev
Log:
[Debugify] Don't treat missing dbg.values as an error (PR37942)
When checking the debug info in a module, don't treat a missing
dbg.value as an error. The dbg.value may simply have been DCE'd, in
which case the debugger has enough information to display the variable
as <optimized out>.
Modified:
llvm/trunk/test/DebugInfo/debugify.ll
llvm/trunk/tools/opt/Debugify.cpp
Modified: llvm/trunk/test/DebugInfo/debugify.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/debugify.ll?rev=335647&r1=335646&r2=335647&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/debugify.ll (original)
+++ llvm/trunk/test/DebugInfo/debugify.ll Tue Jun 26 11:54:10 2018
@@ -94,7 +94,7 @@ define i32 @boom() {
; CHECK-FAIL: WARNING: Missing line 2
; CHECK-FAIL: WARNING: Missing line 3
; CHECK-FAIL: WARNING: Missing line 4
-; CHECK-FAIL: ERROR: Missing variable 1
+; CHECK-FAIL: WARNING: Missing variable 1
; CHECK-FAIL: CheckModuleDebugify: FAIL
; PASS: CheckModuleDebugify: PASS
Modified: llvm/trunk/tools/opt/Debugify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/Debugify.cpp?rev=335647&r1=335646&r2=335647&view=diff
==============================================================================
--- llvm/trunk/tools/opt/Debugify.cpp (original)
+++ llvm/trunk/tools/opt/Debugify.cpp Tue Jun 26 11:54:10 2018
@@ -226,8 +226,7 @@ bool checkDebugifyMetadata(Module &M,
dbg() << "WARNING: Missing line " << Idx + 1 << "\n";
for (unsigned Idx : MissingVars.set_bits())
- dbg() << "ERROR: Missing variable " << Idx + 1 << "\n";
- HasErrors |= MissingVars.count() > 0;
+ dbg() << "WARNING: Missing variable " << Idx + 1 << "\n";
dbg() << Banner;
if (!NameOfWrappedPass.empty())
More information about the llvm-commits
mailing list