Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / dwarf4-types-dwarf5-types.test
bloba5d2ec8df20a689a963119a10a3595e6dcef5f88
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-main.s -o %tmain.o
4 # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-helper.s -o %thelper.o
5 # RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q
6 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
8 # RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s
10 # Check BOLT handles DWARF4/5 with fdebug-types.
12 # POSTCHECK: version = 0x0005
13 # POSTCHECK: DW_TAG_type_unit
14 # POSTCHECK: DW_TAG_member
15 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x{{[0-9a-f]+}}} "char *")
16 # POSTCHECK: DW_TAG_pointer_type [4]
17 # POSTCHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x004a => {0x{{[0-9a-f]+}}} "char")
19 # POSTCHECK: version = 0x0005
20 # POSTCHECK: DW_TAG_type_unit
21 # POSTCHECK: DW_TAG_structure_type
22 # POSTCHECK: DW_TAG_member
23 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x{{[0-9a-f]+}}} "char *")
24 # POSTCHECK: DW_TAG_member
25 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x{{[0-9a-f]+}}} "char *")
26 # POSTCHECK: DW_TAG_pointer_type [4]
27 # POSTCHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x{{[0-9a-f]+}}} "char")
29 # POSTCHECK: version = 0x0004
30 # POSTCHECK: DW_TAG_compile_unit
31 # POSTCHECK: DW_TAG_subprogram
32 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x{{[0-9a-f]+}}} "int")
33 # POSTCHECK: DW_TAG_formal_parameter
34 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x{{[0-9a-f]+}}} "int")
35 # POSTCHECK: DW_TAG_formal_parameter
36 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0083 => {0x{{[0-9a-f]+}}} "char **")
37 # POSTCHECK: DW_TAG_variable
38 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0094 => {0x{{[0-9a-f]+}}} "Foo")
39 # POSTCHECK: DW_TAG_base_type
40 # POSTCHECK: DW_TAG_pointer_type
42 # POSTCHECK: version = 0x0005
43 # POSTCHECK: DW_TAG_compile_unit
44 # POSTCHECK: DW_TAG_subprogram
45 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x004b => {0x{{[0-9a-f]+}}} "int")
46 # POSTCHECK: DW_TAG_variable
47 # POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x004f => {0x{{[0-9a-f]+}}} "Foo2a")
48 # POSTCHECK: DW_TAG_base_type
49 # POSTCHECK: DW_TAG_structure_type
50 # POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0x104ec427d2ebea6f)
51 # POSTCHECK: DW_TAG_structure_type
52 # POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0xb4580bc1535df1e4)
54 # POSTCHECKTU: version = 0x0004
55 # POSTCHECKTU-SAME: type_signature = 0x675d23e4f33235f2
56 # POSTCHECKTU-SAME: type_offset = 0x001e
57 # POSTCHECKTU: DW_TAG_type_unit
58 # POSTCHECKTU: DW_TAG_member
59 # POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x{{[0-9a-f]+}}} "char *")
60 # POSTCHECKTU: DW_TAG_member
61 # POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x{{[0-9a-f]+}}} "char *")
62 # POSTCHECKTU: DW_TAG_pointer_type
63 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0051 => {0x{{[0-9a-f]+}}} "char")
64 # POSTCHECKTU: DW_TAG_base_type
65 # POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")
67 # POSTCHECKTU: version = 0x0004
68 # POSTCHECKTU-SAME: type_signature = 0x49dc260088be7e56
69 # POSTCHECKTU-SAME: type_offset = 0x001e
70 # POSTCHECKTU: DW_TAG_type_unit
71 # POSTCHECKTU: DW_TAG_structure_type
72 # POSTCHECKTU: DW_TAG_member
73 # POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x{{[0-9a-f]+}}} "char *")
74 # POSTCHECKTU: DW_TAG_member
75 # POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x{{[0-9a-f]+}}} "char *")
76 # POSTCHECKTU: DW_TAG_pointer_type
77 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x{{[0-9a-f]+}}} "char")
78 # POSTCHECKTU: DW_TAG_base_type
79 # POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")