Skip to content

Commit a9de010

Browse files
committed
[IR/Verifier] List the CU we weren't able to find in llvm.dbg.cu.
llvm-svn: 295678
1 parent 78cbd28 commit a9de010

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,10 +4421,8 @@ void Verifier::verifyCompileUnits() {
44214421
SmallPtrSet<const Metadata *, 2> Listed;
44224422
if (CUs)
44234423
Listed.insert(CUs->op_begin(), CUs->op_end());
4424-
AssertDI(
4425-
all_of(CUVisited,
4426-
[&Listed](const Metadata *CU) { return Listed.count(CU); }),
4427-
"All DICompileUnits must be listed in llvm.dbg.cu");
4424+
for (auto *CU : CUVisited)
4425+
AssertDI(Listed.count(CU), "DICompileUnit not listed in llvm.dbg.cu", CU);
44284426
CUVisited.clear();
44294427
}
44304428

llvm/test/BugPoint/invalid-debuginfo.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
22
; REQUIRES: loadable_module
3-
; CHECK: All DICompileUnits must be listed in llvm.dbg.cu
3+
; CHECK: DICompileUnit not listed in llvm.dbg.cu
44

55
; When bugpoint hacks at this testcase it will at one point create illegal IR
66
; that won't even pass the Verifier. A bugpoint *driver* built with assertions

llvm/test/Verifier/dbg-orphaned-compileunit.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
22
; CHECK: assembly parsed, but does not verify
3-
; CHECK-NEXT: All DICompileUnits must be listed in llvm.dbg.cu
3+
; CHECK-NEXT: DICompileUnit not listed in llvm.dbg.cu
4+
; CHECK-NEXT: !0 = distinct !DICompileUnit(language: DW_LANG_Fortran77, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
45

56
!named = !{!1}
67
!llvm.module.flags = !{!0}

0 commit comments

Comments
 (0)