Skip to content

Commit be39e9d

Browse files
committed
Revert "Add a verifier check that rejects non-distinct DISubprogram function"
This reverts commit e17f52d. while investigating bot breakage. (cherry picked from commit 8055ae3)
1 parent fdfe990 commit be39e9d

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,10 +2404,6 @@ void Verifier::visitFunction(const Function &F) {
24042404
"function must have a single !dbg attachment", &F, I.second);
24052405
AssertDI(isa<DISubprogram>(I.second),
24062406
"function !dbg attachment must be a subprogram", &F, I.second);
2407-
AssertDI(cast<DISubprogram>(I.second)->isDistinct(),
2408-
"function definition may only have a distinct !dbg attachment",
2409-
&F);
2410-
24112407
auto *SP = cast<DISubprogram>(I.second);
24122408
const Function *&AttachedTo = DISubprogramAttachments[SP];
24132409
AssertDI(!AttachedTo || AttachedTo == &F,

llvm/test/DebugInfo/Generic/2009-11-03-InsertExtractValue.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!llvm.module.flags = !{!6}
44
!llvm.dbg.cu = !{!5}
55

6-
!0 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !4, scope: !1, type: !2)
6+
!0 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !4, scope: !1, type: !2)
77
!1 = !DIFile(filename: "/foo", directory: "bar.cpp")
88
!2 = !DISubroutineType(types: !3)
99
!3 = !{null}

llvm/test/Verifier/unique-disubprogram.ll

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)