summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-26 18:54:10 +0000
committerVedant Kumar <vsk@apple.com>2018-06-26 18:54:10 +0000
commit2e6c5f96dca21f9b38cfdde3ed40aa7d530d124f (patch)
treefd71c83de1b922803ae27ceaffd148f1acaad498
parentb32823cbe979a8115adb097d6ef0017b0e9a7f63 (diff)
downloadbcm5719-llvm-2e6c5f96dca21f9b38cfdde3ed40aa7d530d124f.tar.gz
bcm5719-llvm-2e6c5f96dca21f9b38cfdde3ed40aa7d530d124f.zip
[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>. llvm-svn: 335647
-rw-r--r--llvm/test/DebugInfo/debugify.ll2
-rw-r--r--llvm/tools/opt/Debugify.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/DebugInfo/debugify.ll b/llvm/test/DebugInfo/debugify.ll
index 83e9ea6c9e5..07c62533fad 100644
--- a/llvm/test/DebugInfo/debugify.ll
+++ b/llvm/test/DebugInfo/debugify.ll
@@ -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
diff --git a/llvm/tools/opt/Debugify.cpp b/llvm/tools/opt/Debugify.cpp
index 32e0023b153..e81facf7988 100644
--- a/llvm/tools/opt/Debugify.cpp
+++ b/llvm/tools/opt/Debugify.cpp
@@ -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())
OpenPOWER on IntegriCloud