[llvm] r295678 - [IR/Verifier] List the CU we weren't able to find in `llvm.dbg.cu`.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 14:51:42 PST 2017
Author: davide
Date: Mon Feb 20 16:51:42 2017
New Revision: 295678
URL: http://llvm.org/viewvc/llvm-project?rev=295678&view=rev
Log:
[IR/Verifier] List the CU we weren't able to find in `llvm.dbg.cu`.
Modified:
llvm/trunk/lib/IR/Verifier.cpp
llvm/trunk/test/BugPoint/invalid-debuginfo.ll
llvm/trunk/test/Verifier/dbg-orphaned-compileunit.ll
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=295678&r1=295677&r2=295678&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Feb 20 16:51:42 2017
@@ -4421,10 +4421,8 @@ void Verifier::verifyCompileUnits() {
SmallPtrSet<const Metadata *, 2> Listed;
if (CUs)
Listed.insert(CUs->op_begin(), CUs->op_end());
- AssertDI(
- all_of(CUVisited,
- [&Listed](const Metadata *CU) { return Listed.count(CU); }),
- "All DICompileUnits must be listed in llvm.dbg.cu");
+ for (auto *CU : CUVisited)
+ AssertDI(Listed.count(CU), "DICompileUnit not listed in llvm.dbg.cu", CU);
CUVisited.clear();
}
Modified: llvm/trunk/test/BugPoint/invalid-debuginfo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/invalid-debuginfo.ll?rev=295678&r1=295677&r2=295678&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/invalid-debuginfo.ll (original)
+++ llvm/trunk/test/BugPoint/invalid-debuginfo.ll Mon Feb 20 16:51:42 2017
@@ -1,6 +1,6 @@
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
; REQUIRES: loadable_module
-; CHECK: All DICompileUnits must be listed in llvm.dbg.cu
+; CHECK: DICompileUnit not listed in llvm.dbg.cu
; When bugpoint hacks at this testcase it will at one point create illegal IR
; that won't even pass the Verifier. A bugpoint *driver* built with assertions
Modified: llvm/trunk/test/Verifier/dbg-orphaned-compileunit.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/dbg-orphaned-compileunit.ll?rev=295678&r1=295677&r2=295678&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/dbg-orphaned-compileunit.ll (original)
+++ llvm/trunk/test/Verifier/dbg-orphaned-compileunit.ll Mon Feb 20 16:51:42 2017
@@ -1,6 +1,7 @@
; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
; CHECK: assembly parsed, but does not verify
-; CHECK-NEXT: All DICompileUnits must be listed in llvm.dbg.cu
+; CHECK-NEXT: DICompileUnit not listed in llvm.dbg.cu
+; CHECK-NEXT: !0 = distinct !DICompileUnit(language: DW_LANG_Fortran77, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!named = !{!1}
!llvm.module.flags = !{!0}
More information about the llvm-commits
mailing list