Adrian Prantl | b560ea7 | 2017-04-18 01:21:53 +0000 | [diff] [blame] | 1 | ; RUN: llvm-dis -o - %s.bc | FileCheck %s |
| 2 | |
| 3 | !llvm.dbg.cu = !{!1} |
| 4 | !llvm.module.flags = !{!20, !21} |
| 5 | |
| 6 | !0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true) |
Adrian Prantl | 4a8e703 | 2017-09-21 23:14:55 +0000 | [diff] [blame] | 7 | !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang (llvm/trunk 300520)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) |
Adrian Prantl | b560ea7 | 2017-04-18 01:21:53 +0000 | [diff] [blame] | 8 | !2 = !DIFile(filename: "a.c", directory: "/") |
| 9 | !3 = !{} |
| 10 | !4 = !{!10, !11, !12, !13} |
| 11 | !5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 12 | ; DW_OP_deref should be moved to the back of the expression. |
| 13 | ; |
Adrian Prantl | 4a8e703 | 2017-09-21 23:14:55 +0000 | [diff] [blame] | 14 | ; CHECK: !DIExpression(DW_OP_plus_uconst, 0, DW_OP_deref, DW_OP_LLVM_fragment, 8, 8) |
| 15 | !6 = !DIExpression(DW_OP_deref, DW_OP_plus, 0, DW_OP_LLVM_fragment, 8, 8) |
Florian Hahn | 50963b3 | 2017-06-14 13:14:38 +0000 | [diff] [blame] | 16 | ; CHECK: !DIExpression(DW_OP_plus_uconst, 0, DW_OP_deref) |
Adrian Prantl | b560ea7 | 2017-04-18 01:21:53 +0000 | [diff] [blame] | 17 | !7 = !DIExpression(DW_OP_deref, DW_OP_plus, 0) |
Florian Hahn | 50963b3 | 2017-06-14 13:14:38 +0000 | [diff] [blame] | 18 | ; CHECK: !DIExpression(DW_OP_plus_uconst, 1, DW_OP_deref) |
Adrian Prantl | b560ea7 | 2017-04-18 01:21:53 +0000 | [diff] [blame] | 19 | !8 = !DIExpression(DW_OP_plus, 1, DW_OP_deref) |
| 20 | ; CHECK: !DIExpression(DW_OP_deref) |
| 21 | !9 = !DIExpression(DW_OP_deref) |
| 22 | !10 = !DIGlobalVariableExpression(var: !0, expr: !6) |
| 23 | !11 = !DIGlobalVariableExpression(var: !0, expr: !7) |
| 24 | !12 = !DIGlobalVariableExpression(var: !0, expr: !8) |
| 25 | !13 = !DIGlobalVariableExpression(var: !0, expr: !9) |
| 26 | !20 = !{i32 2, !"Dwarf Version", i32 4} |
| 27 | !21 = !{i32 2, !"Debug Info Version", i32 3} |