diff options
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r-- | llvm/test/Bitcode/DIGlobalVariableExpr.ll | 26 | ||||
-rw-r--r-- | llvm/test/Bitcode/DIGlobalVariableExpr.ll.bc | bin | 0 -> 1052 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/diglobalvariable-3.8.ll | 20 | ||||
-rw-r--r-- | llvm/test/Bitcode/diglobalvariable-3.8.ll.bc | bin | 712 -> 788 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/dityperefs-3.8.ll | 15 |
5 files changed, 50 insertions, 11 deletions
diff --git a/llvm/test/Bitcode/DIGlobalVariableExpr.ll b/llvm/test/Bitcode/DIGlobalVariableExpr.ll new file mode 100644 index 00000000000..aefdf9ebfbe --- /dev/null +++ b/llvm/test/Bitcode/DIGlobalVariableExpr.ll @@ -0,0 +1,26 @@ +; RUN: llvm-dis -o - %s.bc | FileCheck %s + +; CHECK: @g = common global i32 0, align 4, !dbg ![[G:[0-9]+]] +; CHECK: ![[G]] = {{.*}}!DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: ![[GEXPR:[0-9]+]]) +; CHECK: ![[GVAR]] = distinct !DIGlobalVariable(name: "g", +; CHECK: !DIGlobalVariableExpression(var: ![[CVAR:[0-9]+]], expr: ![[CEXPR:[0-9]+]]) +; CHECK: ![[CVAR]] = distinct !DIGlobalVariable(name: "c", +; CHECK: ![[CEXPR]] = !DIExpression(DW_OP_constu, 23, DW_OP_stack_value) +; CHECK: ![[GEXPR]] = !DIExpression(DW_OP_plus, 1) +@g = common global i32 0, align 4, !dbg !0 + +!llvm.dbg.cu = !{!1} +!llvm.module.flags = !{!6, !7, !8} +!llvm.ident = !{!9} + +!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_plus, 1)) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) +!2 = !DIFile(filename: "a.c", directory: "/") +!3 = !{} +!4 = !{!0, !10} +!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!6 = !{i32 2, !"Dwarf Version", i32 4} +!7 = !{i32 2, !"Debug Info Version", i32 3} +!8 = !{i32 1, !"PIC Level", i32 2} +!9 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"} +!10 = distinct !DIGlobalVariable(name: "c", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_constu, 23, DW_OP_stack_value)) diff --git a/llvm/test/Bitcode/DIGlobalVariableExpr.ll.bc b/llvm/test/Bitcode/DIGlobalVariableExpr.ll.bc Binary files differnew file mode 100644 index 00000000000..01e3b0812ee --- /dev/null +++ b/llvm/test/Bitcode/DIGlobalVariableExpr.ll.bc diff --git a/llvm/test/Bitcode/diglobalvariable-3.8.ll b/llvm/test/Bitcode/diglobalvariable-3.8.ll index 55b3f656c57..f00a2dd86f7 100644 --- a/llvm/test/Bitcode/diglobalvariable-3.8.ll +++ b/llvm/test/Bitcode/diglobalvariable-3.8.ll @@ -1,8 +1,20 @@ ; RUN: llvm-dis -o - %s.bc | FileCheck %s -; CHECK: !0 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false, isDefinition: true, expr: !1) -; CHECK: !1 = !DIExpression(DW_OP_constu, 42, DW_OP_stack_value) +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!7, !8} -!named = !{!0} +; CHECK: !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.1", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.1", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, globals: !3) +!1 = !DIFile(filename: "g.c", directory: "/") +!2 = !{} +; CHECK: !3 = !{!4} +!3 = !{!4} +; CHECK: !4 = {{.*}}!DIGlobalVariableExpression(var: !5, expr: !8) +; CHECK: !5 = !DIGlobalVariable(name: "c", scope: !0, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true) +; CHECK: !8 = !DIExpression(DW_OP_constu, 42, DW_OP_stack_value) +!4 = !DIGlobalVariable(name: "c", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32 42) +!5 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !6) +!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!7 = !{i32 2, !"Dwarf Version", i32 2} +!8 = !{i32 2, !"Debug Info Version", i32 3} -!0 = distinct !DIGlobalVariable(name: "a", variable: i32 42) diff --git a/llvm/test/Bitcode/diglobalvariable-3.8.ll.bc b/llvm/test/Bitcode/diglobalvariable-3.8.ll.bc Binary files differindex bfecedd75d9..693c738f649 100644 --- a/llvm/test/Bitcode/diglobalvariable-3.8.ll.bc +++ b/llvm/test/Bitcode/diglobalvariable-3.8.ll.bc diff --git a/llvm/test/Bitcode/dityperefs-3.8.ll b/llvm/test/Bitcode/dityperefs-3.8.ll index 09225d4eba3..b032805bd28 100644 --- a/llvm/test/Bitcode/dityperefs-3.8.ll +++ b/llvm/test/Bitcode/dityperefs-3.8.ll @@ -18,13 +18,14 @@ ; CHECK-NEXT: !7 = !DILocalVariable(name: "V1", scope: !6, type: !2) ; CHECK-NEXT: !8 = !DIObjCProperty(name: "P1", type: !1) ; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !1) -; CHECK-NEXT: !10 = !DIGlobalVariable(name: "G",{{.*}} type: !1, -; CHECK-NEXT: !11 = !DITemplateValueParameter(type: !1, value: i32* @G1) -; CHECK-NEXT: !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1) -; CHECK-NEXT: !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !14, identifier: "T3") -; CHECK-NEXT: !14 = !{!15} -; CHECK-NEXT: !15 = !DISubprogram(scope: !13, -; CHECK-NEXT: !16 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type,{{.*}} extraData: !13) +; CHECK-NEXT: !10 = distinct !DIGlobalVariableExpression(var: !11) +; CHECK-NEXT: !11 = !DIGlobalVariable(name: "G",{{.*}} type: !1, +; CHECK-NEXT: !12 = !DITemplateValueParameter(type: !1, value: i32* @G1) +; CHECK-NEXT: !13 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1) +; CHECK-NEXT: !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !15, identifier: "T3") +; CHECK-NEXT: !15 = !{!16} +; CHECK-NEXT: !16 = !DISubprogram(scope: !14, +; CHECK-NEXT: !17 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type,{{.*}} extraData: !14) !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1", file: !0, identifier: "T1") |