; For some reason, the output when targetting sparc is not quite as expected.
; XFAIL: sparc
-; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump -debug-info - | FileCheck %s --implicit-check-not=DW_TAG
; IR generated from clang -O0 with:
; struct C {
; void fun4() { b && (C(), 1); }
; __attribute__((always_inline)) C::~C() { }
-; CHECK: DW_TAG_structure_type
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("C")
-; CHECK-NOT: {{DW_TAG|NULL}}
+; CHECK: DW_TAG_compile_unit
+
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_AT_name ("C")
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_name ("~C")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_TAG_pointer_type
+
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name ("_ZN1CD1Ev")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_AT_name ("this")
+; CHECK: DW_TAG_pointer_type
+
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_name ("fun4")
+; CHECK: DW_TAG_inlined_subroutine
+; CHECK: DW_AT_abstract_origin {{.*}} "_ZN1CD1Ev"
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_AT_abstract_origin {{.*}} "this"
+
; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("~C")
-
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_linkage_name ("_ZN1CD1Ev")
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_formal_parameter
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("this")
-
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("fun4")
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_inlined_subroutine
-; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}} "_ZN1CD1Ev"
-; CHECK-NOT: {{DW_TAG|NULL}}
; CHECK: DW_TAG_formal_parameter
-; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}} "this"
-; FIXME: D2 is actually inlined into D1 but doesn't show up here, possibly due
-; to there being no work in D2 (calling another member function from the dtor
-; causes D2 to show up, calling a free function doesn't).
-
-; CHECK-NOT: DW_TAG
-; CHECK: NULL
-; CHECK-NOT: DW_TAG
-; CHECK: NULL
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name ("_ZN1CD2Ev")
+; CHECK: DW_AT_specification {{.*}} "~C"
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_AT_name ("this")
%struct.C = type { i8 }
-; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump - | FileCheck %s
+; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump - | FileCheck %s --implicit-check-not "{{DW_TAG|NULL}}"
+
; CHECK: debug_info contents
-; CHECK: DW_AT_name {{.*}}[[F1:.*]])
+; CHECK:DW_TAG_compile_unit
+
; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
+; CHECK: DW_AT_name ("A")
; CHECK-NOT: DW_AT_decl_file
; CHECK-NOT: DW_AT_decl_line
-; CHECK-NOT: NULL
+
; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
-; CHECK-NEXT: DW_AT_name ("B")
+; CHECK: DW_AT_name ("B")
; CHECK-NOT: DW_AT_decl_file
; CHECK-NOT: DW_AT_decl_line
-; CHECK-NOT: NULL
+
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
-; CHECK-NEXT: DW_AT_name ("i")
+; CHECK: DW_AT_name ("i")
; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
-; CHECK-NEXT: DW_AT_name ("var_fwd")
-; CHECK-NOT: NULL
+; CHECK: DW_AT_name ("var_fwd")
+
; CHECK: [[FOO:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
-; CHECK-NEXT: DW_AT_name ("foo")
-; CHECK-NEXT: DW_AT_declaration
-; CHECK-NOT: NULL
+; CHECK: DW_AT_name ("foo")
+; CHECK: DW_AT_declaration
; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
-; CHECK-NEXT: DW_AT_name ("bar")
+; CHECK: DW_AT_name ("bar")
+
; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_MIPS_linkage_name
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("f1")
+; CHECK: DW_AT_MIPS_linkage_name
+; CHECK: DW_AT_name ("f1")
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_MIPS_linkage_name
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("f1")
+; CHECK: DW_AT_MIPS_linkage_name
+; CHECK: DW_AT_name ("f1")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: NULL
+
; CHECK: [[BAZ:0x[0-9a-f]*]]:{{.*}}DW_TAG_typedef
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("baz")
+; CHECK: DW_AT_name ("baz")
+
; CHECK: [[VAR_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("var_decl")
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_declaration
+; CHECK: DW_AT_name ("var_decl")
+; CHECK: DW_AT_declaration
+
; CHECK: [[FUNC_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("func_decl")
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_declaration
+; CHECK: DW_AT_name ("func_decl")
+; CHECK: DW_AT_declaration
+
; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("func_fwd")
+; CHECK: DW_AT_name ("func_fwd")
; CHECK-NOT: DW_AT_declaration
; CHECK: NULL
-; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
-; CHECK-NEXT: DW_AT_decl_file ([[F2:.*]])
-; CHECK-NEXT: DW_AT_decl_line (15)
-; CHECK-NEXT: DW_AT_import ([[NS2]])
+; CHECK: DW_AT_decl_file ([[F2:.*]])
+; CHECK: DW_AT_decl_line (15)
+; CHECK: DW_AT_import ([[NS2]])
+; CHECK: DW_TAG_imported_declaration
; CHECK: NULL
-; CHECK-NOT: NULL
+; CHECK: DW_TAG_base_type
; CHECK: DW_TAG_imported_module
-; CHECK-NEXT: DW_AT_decl_file ([[F2:.*]])
-; CHECK-NEXT: DW_AT_decl_line (18)
-; CHECK-NEXT: DW_AT_import ([[NS1]])
-; CHECK-NOT: NULL
+; CHECK: DW_AT_decl_file ([[F2:.*]])
+; CHECK: DW_AT_decl_line (18)
+; CHECK: DW_AT_import ([[NS1]])
+; CHECK: DW_TAG_imported_declaration
; CHECK: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_MIPS_linkage_name
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name ("func")
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_module
-; CHECK-NEXT: DW_AT_decl_file ([[F2:.*]])
-; CHECK-NEXT: DW_AT_decl_line (26)
-; CHECK-NEXT: DW_AT_import ([[NS1]])
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (27)
-; CHECK-NEXT: DW_AT_import ([[FOO]])
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (28)
-; CHECK-NEXT: DW_AT_import ([[BAR]])
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (29)
-; CHECK-NEXT: DW_AT_import ([[FUNC1]])
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (30)
-; CHECK-NEXT: DW_AT_import ([[I]])
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (31)
-; CHECK-NEXT: DW_AT_import ([[BAZ]])
-; CHECK-NOT: NULL
-; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (32)
-; CHECK-NEXT: DW_AT_import ([[NS1]])
-; CHECK-NEXT: DW_AT_name ("X")
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (33)
-; CHECK-NEXT: DW_AT_import ([[X]])
-; CHECK-NEXT: DW_AT_name ("Y")
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (34)
-; CHECK-NEXT: DW_AT_import ([[VAR_DECL]])
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (35)
-; CHECK-NEXT: DW_AT_import ([[FUNC_DECL]])
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (36)
-; CHECK-NEXT: DW_AT_import ([[VAR_FWD]])
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (37)
-; CHECK-NEXT: DW_AT_import ([[FUNC_FWD]])
+; CHECK: DW_AT_MIPS_linkage_name
+; CHECK: DW_AT_name ("func")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_TAG_imported_module
+; CHECK: DW_AT_decl_file ([[F2:.*]])
+; CHECK: DW_AT_decl_line (26)
+; CHECK: DW_AT_import ([[NS1]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (27)
+; CHECK: DW_AT_import ([[FOO]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (28)
+; CHECK: DW_AT_import ([[BAR]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (29)
+; CHECK: DW_AT_import ([[FUNC1]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (30)
+; CHECK: DW_AT_import ([[I]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (31)
+; CHECK: DW_AT_import ([[BAZ]])
+; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (32)
+; CHECK: DW_AT_import ([[NS1]])
+; CHECK: DW_AT_name ("X")
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (33)
+; CHECK: DW_AT_import ([[X]])
+; CHECK: DW_AT_name ("Y")
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (34)
+; CHECK: DW_AT_import ([[VAR_DECL]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (35)
+; CHECK: DW_AT_import ([[FUNC_DECL]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (36)
+; CHECK: DW_AT_import ([[VAR_FWD]])
+; CHECK: DW_TAG_imported_declaration
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (37)
+; CHECK: DW_AT_import ([[FUNC_FWD]])
+; CHECK: DW_TAG_lexical_block
+; CHECK: DW_TAG_imported_module
+; CHECK: DW_AT_decl_file ([[F2]])
+; CHECK: DW_AT_decl_line (23)
+; CHECK: DW_AT_import {{.*}}
+; CHECK: NULL
+; CHECK: NULL
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_module
-; CHECK-NEXT: DW_AT_decl_file ([[F2]])
-; CHECK-NEXT: DW_AT_decl_line (23)
-; CHECK-NEXT: DW_AT_import {{.*}}
-; CHECK: NULL
-; CHECK: NULL
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_TAG_base_type
; CHECK: NULL
; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths
-; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info --name=data --name=d -c - \
+; RUN: | FileCheck %s --implicit-check-not=DW_TAG
; Generated by clang -c -g -std=c11 -S -emit-llvm from the following C11 source
;
; return 0;
; }
-; CHECK: DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"d"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}2048
-; CHECK: DW_TAG_structure_type
-; CHECK: DW_TAG_member
-; CHECK: DW_TAG_member
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"arr"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}128
+; CHECK: DW_TAG_variable
+; CHECK: DW_AT_name{{.*}}"d"
+; CHECK: DW_AT_alignment{{.*}}2048
+
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_TAG_member
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name{{.*}}"arr"
+; CHECK: DW_AT_alignment{{.*}}128
; ModuleID = 'test.c'
source_filename = "test.c"
-; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info -c -n S -n C0 -n C1 -n s -n E -n foo - \
+; RUN: | FileCheck %s --implicit-check-not=DW_TAG
; Generated by clang++ -c -g -std=c++11 -S -emit-llvm from the following C++11 source
; struct S {
; auto Lambda = [i](){};
; }
-; CHECK: DW_TAG_class_type
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"C0"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}64
-
-; CHECK: DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"s"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}2048
-
-; CHECK: DW_TAG_structure_type
-; CHECK: DW_TAG_member
-; CHECK: DW_AT_name{{.*}}"xx"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}128
-
-; CHECK: DW_TAG_enumeration_type
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}16
-
-; CHECK: DW_TAG_variable
-; CHECK: DW_AT_name{{.*}}"i"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}32
-; CHECK: DW_TAG_class_type
-; CHECK: DW_TAG_member
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"i"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}32
-
-; CHECK: DW_TAG_class_type
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"C1"
-; CHECK: DW_TAG_member
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"p"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}64
+; CHECK: DW_TAG_class_type
+; CHECK: DW_AT_name{{.*}}"C0"
+; CHECK: DW_AT_alignment{{.*}}64
+
+; CHECK: DW_TAG_variable
+; CHECK: DW_AT_name{{.*}}"s"
+; CHECK: DW_AT_alignment{{.*}}2048
+
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_TAG_member
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name{{.*}}"xx"
+; CHECK: DW_AT_alignment{{.*}}128
+
+; CHECK: DW_TAG_enumeration_type
+; CHECK: DW_AT_alignment{{.*}}16
+; CHECK: DW_TAG_enumerator
+; CHECK: DW_TAG_enumerator
+; CHECK: DW_TAG_enumerator
+
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_variable
+; CHECK: DW_AT_name{{.*}}"i"
+; CHECK: DW_AT_alignment{{.*}}32
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_class_type
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name{{.*}}"i"
+; CHECK: DW_AT_alignment{{.*}}32
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_TAG_formal_parameter
+
+; CHECK: DW_TAG_class_type
+; CHECK: DW_AT_name{{.*}}"C1"
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name{{.*}}"p"
+; CHECK: DW_AT_alignment{{.*}}64
; ModuleID = 'test.cpp'
source_filename = "test.cpp"
-; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s --implicit-check-not=DW_TAG
; typedef struct __attribute__((aligned (128))) {
; char c;
; __attribute__((aligned (32))) int i;
; }
-; CHECK: DW_TAG_typedef
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"S0"
-; CHECK: DW_TAG_structure_type
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}128
+; CHECK: DW_TAG_compile_unit
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_typedef
+; CHECK: DW_AT_name{{.*}}"S0"
-; CHECK: DW_TAG_variable
-; CHECK: DW_AT_name{{.*}}"i"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}32
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_AT_alignment{{.*}}128
+; CHECK: DW_TAG_member
+; CHECK: DW_TAG_base_type
-; CHECK: DW_TAG_typedef
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"S1"
-; CHECK: DW_TAG_structure_type
-; CHECK: DW_TAG_member
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}"c"
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_alignment{{.*}}64
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_variable
+; CHECK: DW_AT_name{{.*}}"i"
+; CHECK: DW_AT_alignment{{.*}}32
+
+; CHECK: DW_TAG_typedef
+; CHECK: DW_AT_name{{.*}}"S1"
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name{{.*}}"c"
+; CHECK: DW_AT_alignment{{.*}}64
+; CHECK: DW_TAG_base_type
; ModuleID = 'test.m'
source_filename = "test.m"
; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s | FileCheck -check-prefix=ASM %s
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump --debug-info --debug-gnu-pubnames --debug-gnu-pubtypes - | FileCheck %s --implicit-check-not "{{DW_TAG|NULL}}"
; ModuleID = 'dwarf-public-names.cpp'
;
; Generated from:
; ASM-NEXT: .asciz "C" # External Name
; CHECK: .debug_info contents:
-; CHECK: Compile Unit:
-; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
+; CHECK: DW_TAG_compile_unit
+; CHECK: DW_AT_GNU_pubnames (true)
; CHECK-NOT: DW_AT_GNU_pubtypes [
-; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
-; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable"
-
-; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "C"
-
-; CHECK: DW_TAG_member
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "static_member_variable"
-
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_linkage_name
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "member_function"
-
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_linkage_name
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "static_member_function"
-
-; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "int"
-
-; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "global_variable"
-
-; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "ns"
-
-; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
-; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
-; CHECK: DW_AT_name {{.*}} "global_namespace_variable"
-; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
-; CHECK-NOT: DW_AT_specification
-; CHECK: DW_AT_location
-; CHECK-NOT: DW_AT_specification
-
-; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "d"
-; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
-; CHECK: DW_AT_location
-; CHECK-NOT: DW_AT_specification
-
-; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "D"
-
-; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_linkage_name
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "global_namespace_function"
-
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "f3"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[F3_Z:.*]]: DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "z"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_location
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
+; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
+; CHECK: DW_AT_specification {{.*}} "static_member_variable"
+
+; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
+; CHECK: DW_AT_name ("C")
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name ("static_member_variable")
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name
+; CHECK: DW_AT_name ("member_function")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: NULL
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name
+; CHECK: DW_AT_name ("static_member_function")
+; CHECK: NULL
+
+; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
+; CHECK: DW_AT_name ("int")
+; CHECK: DW_TAG_pointer_type
+
+; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
+; CHECK: DW_AT_name ("global_variable")
+
+; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
+; CHECK: DW_AT_name ("ns")
+; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
+; CHECK: DW_AT_name ("global_namespace_variable")
+; CHECK-NOT: DW_AT_specification
+; CHECK: DW_AT_location
+; CHECK-NOT: DW_AT_specification
+; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
+; CHECK: DW_AT_name ("d")
+; CHECK-NOT: DW_AT_specification
+; CHECK: DW_AT_location
+; CHECK-NOT: DW_AT_specification
+; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
+; CHECK: DW_AT_name ("D")
+; CHECK: DW_TAG_member
+; CHECK: NULL
+; CHECK: DW_TAG_variable
+; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name
+; CHECK: DW_AT_name ("global_namespace_function")
+; CHECK: NULL
+
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_name ("f3")
+; CHECK: [[F3_Z:.*]]: DW_TAG_variable
+; CHECK: DW_AT_name ("z")
+; CHECK: DW_AT_location
+; CHECK: NULL
-; CHECK: [[ANON:.*]]: DW_TAG_namespace
+; CHECK: [[ANON:.*]]: DW_TAG_namespace
+; CHECK-NOT: DW_AT_name
+; CHECK: [[ANON_I:.*]]: DW_TAG_variable
+; CHECK: DW_AT_name ("i")
+; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace
+; CHECK: DW_AT_name ("inner")
+; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable
+; CHECK: DW_AT_name ("b")
+; CHECK: NULL
+; CHECK: NULL
+
+; CHECK: [[OUTER:.*]]: DW_TAG_namespace
+; CHECK: DW_AT_name ("outer")
+; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
; CHECK-NOT: DW_AT_name
-; CHECK: [[ANON_I:.*]]: DW_TAG_variable
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "i"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "inner"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "b"
-; CHECK-NOT: {{DW_TAG|NULL}}
+; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable
+; CHECK: DW_AT_name ("c")
+; CHECK: NULL
; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: [[OUTER:.*]]: DW_TAG_namespace
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "outer"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK-NOT: DW_AT_name
-; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "c"
-; CHECK-NOT: {{DW_TAG|NULL}}
+
+; CHECK: DW_TAG_enumeration
+; CHECK: [[UNNAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
+; CHECK: DW_AT_name ("unnamed_enum_enumerator")
; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
+
+; CHECK: [[UNSIGNED_INT:0x[0-9a-f]+]]: DW_TAG_base_type
+; CHECK: DW_AT_name ("unsigned int")
+
+; CHECK: [[NAMED_ENUM:0x[0-9a-f]+]]: DW_TAG_enumeration
+; CHECK: DW_AT_name ("named_enum")
+; CHECK: [[NAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
+; CHECK: DW_AT_name ("named_enum_enumerator")
+; CHECK: NULL
+
+; CHECK: [[NAMED_ENUM_CLASS:0x[0-9a-f]+]]: DW_TAG_enumeration
+; CHECK: DW_AT_name ("named_enum_class")
+; CHECK: [[NAMED_ENUM_CLASS_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
+; CHECK: DW_AT_name ("named_enum_class_enumerator")
+; CHECK: NULL
+
+; CHECK: DW_TAG_imported_declaration
+
+; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
+; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
+; CHECK: DW_TAG_formal_parameter
; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: DW_TAG_enumeration
-; CHECK-NOT: {{DW_AT_name|DW_TAG|NULL}}
-; CHECK: [[UNNAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "unnamed_enum_enumerator"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: [[UNSIGNED_INT:0x[0-9a-f]+]]: DW_TAG_base_type
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "unsigned int"
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: [[NAMED_ENUM:0x[0-9a-f]+]]: DW_TAG_enumeration
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "named_enum"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[NAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "named_enum_enumerator"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: [[NAMED_ENUM_CLASS:0x[0-9a-f]+]]: DW_TAG_enumeration
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "named_enum_class"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: [[NAMED_ENUM_CLASS_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "named_enum_class_enumerator"
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: NULL
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: DW_TAG_imported_declaration
-; CHECK-NOT: {{DW_TAG|NULL}}
-
-; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
-
-; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
-
-; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_linkage_name
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_AT_name {{.*}} "global_function"
+
+; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
+; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
+
+; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name
+; CHECK: DW_AT_name ("global_function")
+
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_TAG_pointer_type
+; CHECK: DW_TAG_pointer_type
+; CHECK: NULL
; CHECK-LABEL: .debug_gnu_pubnames contents:
; CHECK-NEXT: length = {{.*}}, version = 0x0002, unit_offset = 0x00000000, unit_size = {{.*}}