brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · d9a4f38 Raw
48 lines · plain
1; RUN: llvm-reduce %s -o %t --delta-passes=di-metadata --test FileCheck --test-arg %s --test-arg --input-file --abort-on-invalid-reduction2; CHECK: , !dbg !113 4;; Tests for the bug fixed in PR#108541, where the presence of null metadata5;; could result in a crash.6 7define i1 @ham() {8bb:9  %call = call fastcc i32 @hoge()10  ret i1 false11}12 13define fastcc i32 @hoge() {14bb:15  br i1 poison, label %bb1, label %bb216 17bb1:                                              ; preds = %bb18  br i1 false, label %bb2, label %bb2, !dbg !1119 20bb2:                                              ; preds = %bb1, %bb1, %bb21  ret i32 022}23 24!llvm.dbg.cu = !{!0}25!llvm.module.flags = !{!10}26 27!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 20.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, globals: !2, imports: !3, splitDebugInlining: false, nameTableKind: None)28!1 = !DIFile(filename: "108541-metadata-crash.cpp", directory: "/tmp")29!2 = !{}30!3 = !{!4}31!4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !6, file: !7, line: 134)32!5 = !DINamespace(name: "std", scope: null)33!6 = !DISubprogram(name: "abort", scope: !7, file: !7, line: 730, type: !8, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagOptimized)34!7 = !DIFile(filename: "108541-metadata-crash.cpp", directory: "")35!8 = !DISubroutineType(types: !9)36!9 = !{null}37!10 = !{i32 2, !"Debug Info Version", i32 3}38!11 = !DILocation(line: 26, column: 11, scope: !12)39!12 = distinct !DILexicalBlock(scope: !14, file: !13, line: 26, column: 11)40!13 = !DIFile(filename: "108541-metadata-crash.cpp", directory: "/tmp")41!14 = distinct !DILexicalBlock(scope: !15, file: !13, line: 25, column: 5)42!15 = distinct !DILexicalBlock(scope: !16, file: !13, line: 24, column: 9)43!16 = distinct !DILexicalBlock(scope: !17, file: !13, line: 14, column: 3)44!17 = distinct !DILexicalBlock(scope: !18, file: !13, line: 13, column: 3)45!18 = distinct !DILexicalBlock(scope: !19, file: !13, line: 13, column: 3)46!19 = distinct !DISubprogram(name: "hoge", linkageName: "hoge", scope: !13, file: !13, line: 10, type: !20, scopeLine: 11, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)47!20 = distinct !DISubroutineType(types: !2)48