Debian Codegraph @

llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test

raw
1 # RUN: dsymutil --linker=parallel -f -o %t1.o -oso-prepend-path=%p/../ -y %s
2 # RUN: llvm-dwarfdump --verify %t1.o | FileCheck -check-prefixes=VERIFY %s
3 # RUN: dsymutil --linker=parallel -f -o %t2.o -oso-prepend-path=%p/../ -y %s
4 # RUN: dsymutil --linker=parallel -f -o %t3.o -oso-prepend-path=%p/../ -y %s \
5 # RUN: --num-threads 1
6 # RUN: dsymutil --linker=parallel -f -o %t4.o -oso-prepend-path=%p/../ -y %s \
7 # RUN: --num-threads 3
8 # ### Following comparision will fail if files do not match
9 # RUN: diff %t1.o %t2.o
10 # RUN: diff %t1.o %t3.o
11 # RUN: diff %t1.o %t4.o
12
13 # This test checks that generated output does not differ between runs.
14 #
15 # To recreate a test compile following example:
16 #
17 # main.cpp:
18 #
19 # include <string>
20 #
21 # void PrintSize ( const std::string& String );
22 # void PrintNewString ( const std::string& String );
23 # void PrintNewString2 ( const char* String );
24 #
25 # int main ( void ) {
26 #
27 # PrintSize("hello");
28 # PrintNewString("hello");
29 # PrintNewString2("hello");
30 # printf("\n");
31 #
32 # return 0;
33 # }
34 #
35 # foo1.cpp:
36 #
37 # #include <string>
38 #
39 # void PrintSize ( const std::string& String ) {
40 # printf("\n String size %lu", String.size() );
41 # };
42 #
43 # foo2.cpp:
44 #
45 # #include <string>
46 #
47 # void PrintNewString ( const std::string& String ) {
48 # std::string NewString(String);
49 # NewString += "++";
50 # printf("\n String %s", NewString.c_str());
51 #};
52 #
53 # foo3.cpp:
54 # #include <string>
55 #
56 # void PrintNewString2 ( const char* String ) {
57 # std::string NewString(String);
58 # NewString += "++";
59 # printf("\n String2 %s", NewString.c_str());
60 # };
61 #
62 # with clang++ -O -fno-inline -g -std=c++11
63
64 ---
65 triple: 'x86_64-apple-darwin'
66 objects:
67 - filename: 'Inputs/String/foo1.o'
68 timestamp: 1638904719
69 symbols:
70 - { sym: __ZNKSt3__122__compressed_pair_elemINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repELi0ELb0EE5__getEv, objAddr: 0x00000000000000A0, binAddr: 0x0000000100000B10, size: 0x00000009 }
71 - { sym: __ZNKSt3__117__compressed_pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repES5_E5firstEv, objAddr: 0x0000000000000090, binAddr: 0x0000000100000B00, size: 0x00000010 }
72 - { sym: __Z9PrintSizeRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE, objAddr: 0x0000000000000000, binAddr: 0x0000000100000A70, size: 0x00000020 }
73 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE15__get_long_sizeEv, objAddr: 0x0000000000000060, binAddr: 0x0000000100000AD0, size: 0x00000010 }
74 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4sizeEv, objAddr: 0x0000000000000020, binAddr: 0x0000000100000A90, size: 0x00000030 }
75 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__get_short_sizeEv, objAddr: 0x0000000000000070, binAddr: 0x0000000100000AE0, size: 0x00000020 }
76 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__is_longEv, objAddr: 0x0000000000000050, binAddr: 0x0000000100000AC0, size: 0x00000010 }
77 - filename: 'Inputs/String/foo2.o'
78 timestamp: 1638904723
79 symbols:
80 - { sym: __ZNSt3__112__to_addressIKcEEPT_S3_, objAddr: 0x00000000000000E0, binAddr: 0x0000000100000BD0, size: 0x00000010 }
81 - { sym: GCC_except_table0, objAddr: 0x000000000000016C, binAddr: 0x0000000100000F24, size: 0x00000000 }
82 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE18__get_long_pointerEv, objAddr: 0x0000000000000120, binAddr: 0x0000000100000C10, size: 0x00000010 }
83 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__get_short_pointerEv, objAddr: 0x0000000000000130, binAddr: 0x0000000100000C20, size: 0x00000020 }
84 - { sym: __ZNSt3__114pointer_traitsIPKcE10pointer_toERS1_, objAddr: 0x0000000000000150, binAddr: 0x0000000100000C40, size: 0x00000010 }
85 - { sym: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEpLEPKc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000B90, size: 0x00000010 }
86 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv, objAddr: 0x00000000000000C0, binAddr: 0x0000000100000BB0, size: 0x00000020 }
87 - { sym: __Z14PrintNewStringRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE, objAddr: 0x0000000000000000, binAddr: 0x0000000100000B20, size: 0x00000070 }
88 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv, objAddr: 0x0000000000000080, binAddr: 0x0000000100000BA1, size: 0x00000010 }
89 - { sym: __ZNSt3__19addressofIKcEEPT_RS2_, objAddr: 0x0000000000000160, binAddr: 0x0000000100000C50, size: 0x00000009 }
90 - { sym: __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__get_pointerEv, objAddr: 0x00000000000000F0, binAddr: 0x0000000100000BE0, size: 0x00000030 }
91 - filename: 'Inputs/String/foo3.o'
92 timestamp: 1638904727
93 symbols:
94 - { sym: __ZNSt3__117__compressed_pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repES5_EC2INS_18__default_init_tagESA_EEOT_OT0_, objAddr: 0x0000000000000130, binAddr: 0x0000000100000D40, size: 0x00000040 }
95 - { sym: __ZNSt3__117__compressed_pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repES5_EC1INS_18__default_init_tagESA_EEOT_OT0_, objAddr: 0x0000000000000110, binAddr: 0x0000000100000D20, size: 0x00000010 }
96 - { sym: __ZNSt3__111char_traitsIcE6lengthEPKc, objAddr: 0x0000000000000120, binAddr: 0x0000000100000D50, size: 0x00000010 }
97 - { sym: __ZNSt3__116__non_trivial_ifILb1ENS_9allocatorIcEEEC2Ev, objAddr: 0x00000000000001B0, binAddr: 0x0000000100000DC0, size: 0x00000010 }
98 - { sym: __ZNSt3__17forwardINS_18__default_init_tagEEEOT_RNS_16remove_referenceIS2_E4typeE, objAddr: 0x0000000000000170, binAddr: 0x0000000100000D80, size: 0x00000010 }
99 - { sym: __ZNSt3__122__compressed_pair_elemINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repELi0ELb0EEC2ENS_18__default_init_tagE, objAddr: 0x0000000000000180, binAddr: 0x0000000100000D90, size: 0x00000010 }
100 - { sym: __ZNSt3__122__compressed_pair_elemINS_9allocatorIcEELi1ELb1EEC2ENS_18__default_init_tagE, objAddr: 0x0000000000000190, binAddr: 0x0000000100000DA0, size: 0x00000010 }
101 - { sym: __ZNSt3__19allocatorIcEC2Ev, objAddr: 0x00000000000001A0, binAddr: 0x0000000100000DB0, size: 0x00000010 }
102 - { sym: __Z15PrintNewString2PKc, objAddr: 0x0000000000000000, binAddr: 0x0000000100000C60, size: 0x00000070 }
103 - { sym: GCC_except_table0, objAddr: 0x000000000000026C, binAddr: 0x0000000100000F34, size: 0x00000000 }
104 - { sym: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1IDnEEPKc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000CD0, size: 0x00000010 }
105 - { sym: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2IDnEEPKc, objAddr: 0x00000000000000D0, binAddr: 0x0000000100000CE0, size: 0x00000040 }
106 - filename: 'Inputs/String/main.o'
107 timestamp: 1638904734
108 symbols:
109 - { sym: _main, objAddr: 0x0000000000000000, binAddr: 0x0000000100000DD0, size: 0x00000090 }
110 - { sym: GCC_except_table0, objAddr: 0x0000000000000188, binAddr: 0x0000000100000F44, size: 0x00000000 }
111 ...
112
113 VERIFY: Verifying .debug_abbrev...
114 VERIFY: Verifying .debug_info Unit Header Chain...
115 VERIFY: Verifying .debug_types Unit Header Chain...
116 VERIFY: Verifying .apple_names...
117 VERIFY: Verifying .apple_types...
118 VERIFY: Verifying .apple_namespaces...
119 VERIFY: Verifying .apple_objc...
120 VERIFY: No errors.