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