brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 6ef4916 Raw
33 lines · plain
1; RUN: opt -S -passes=add-discriminators < %s | FileCheck %s2 3declare void @llvm.dbg.declare(metadata, metadata, metadata)4 5; This checks whether the add-discriminators pass producess valid metadata on6; llvm.dbg.declare instructions7;8; CHECK-LABEL: @test_valid_metadata9define void @test_valid_metadata() {10  %a = alloca i811  call void @llvm.dbg.declare(metadata ptr %a, metadata !2, metadata !5), !dbg !612  %b = alloca i813  call void @llvm.dbg.declare(metadata ptr %b, metadata !9, metadata !5), !dbg !1114  ret void15}16 17!llvm.module.flags = !{!0, !1}18!llvm.dbg.cu = !{!12}19 20!0 = !{i32 2, !"Dwarf Version", i32 4}21!1 = !{i32 2, !"Debug Info Version", i32 3}22!2 = !DILocalVariable(scope: !3)23!3 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !12)24!4 = !DIFile(filename: "a.cpp", directory: "/tmp")25!5 = !DIExpression()26!6 = !DILocation(line: 0, scope: !3, inlinedAt: !7)27!7 = distinct !DILocation(line: 0, scope: !8)28!8 = distinct !DISubprogram(linkageName: "test_valid_metadata", scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !12)29!9 = !DILocalVariable(scope: !10)30!10 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !12)31!11 = !DILocation(line: 0, scope: !10)32!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4)33