1; RUN: not opt -verify %s 2>&1 | FileCheck %s 2 3; Make sure we emit this diagnostic only once (which means we don't visit the 4; same DISubprogram twice. 5; CHECK: subprogram definitions must have a compile unit 6; CHECK-NEXT: !3 = distinct !DISubprogram(name: "patatino", scope: null, isLocal: false, isDefinition: true, isOptimized: false) 7; CHECK-NOT: subprogram definitions must have a compile unit 8; CHECK-NOT: !3 = distinct !DISubprogram(name: "patatino", scope: null, isLocal: false, isDefinition: true, isOptimized: false) 9 10define void @tinkywinky() !dbg !3 { ret void } 11 12!llvm.module.flags = !{!4} 13!llvm.dbg.cu = !{!0} 14!0 = distinct !DICompileUnit(language: 12, file: !1) 15!1 = !DIFile(filename: "/home/davide", directory: "/home/davide") 16!3 = distinct !DISubprogram(name: "patatino", isDefinition: true) 17!4 = !{i32 2, !"Debug Info Version", i32 3} 18