comparison test/Transforms/AddDiscriminators/dbg-declare-discriminator.ll @ 100:7d135dc70f03 LLVM 3.9

LLVM 3.9
author Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp>
date Tue, 26 Jan 2016 22:53:40 +0900
parents
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
96:6418606d0ead 100:7d135dc70f03
1 ; RUN: opt -S -add-discriminators < %s | FileCheck %s
2
3 declare void @llvm.dbg.declare(metadata, metadata, metadata)
4
5 ; This checks whether the add-discriminators pass producess valid metadata on
6 ; llvm.dbg.declare instructions
7 ;
8 ; CHECK-LABEL: @test_valid_metadata
9 define void @test_valid_metadata() {
10 %a = alloca i8
11 call void @llvm.dbg.declare(metadata i8* %a, metadata !2, metadata !5), !dbg !6
12 %b = alloca i8
13 call void @llvm.dbg.declare(metadata i8* %b, metadata !9, metadata !5), !dbg !11
14 ret void
15 }
16
17 !llvm.module.flags = !{!0, !1}
18
19 !0 = !{i32 2, !"Dwarf Version", i32 4}
20 !1 = !{i32 2, !"Debug Info Version", i32 3}
21 !2 = !DILocalVariable(scope: !3)
22 !3 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false)
23 !4 = !DIFile(filename: "a.cpp", directory: "/tmp")
24 !5 = !DIExpression()
25 !6 = !DILocation(line: 0, scope: !3, inlinedAt: !7)
26 !7 = distinct !DILocation(line: 0, scope: !8)
27 !8 = distinct !DISubprogram(linkageName: "test_valid_metadata", scope: null, isLocal: false, isDefinition: true, isOptimized: false)
28 !9 = !DILocalVariable(scope: !10)
29 !10 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false)
30 !11 = !DILocation(line: 0, scope: !10)