OLD | NEW |
---|---|
1 ; Tests the Subzero "name mangling" when using the "llvm2ice --prefix" | 1 ; Tests the Subzero "name mangling" when using the "llvm2ice --prefix" |
2 ; option. | 2 ; option. |
3 | 3 |
4 ; RUN: %llvm2ice --verbose none %s | FileCheck %s | 4 ; RUN: %llvm2ice --verbose none %s | FileCheck %s |
5 ; RUN: %llvm2ice --verbose none --prefix Subzero %s | FileCheck --check-prefix=M ANGLE %s | 5 ; RUN: %llvm2ice --verbose none --prefix Subzero %s | FileCheck --check-prefix=M ANGLE %s |
6 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 6 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
7 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 7 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
8 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 8 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
9 ; RUN: | FileCheck --check-prefix=DUMP %s | 9 ; RUN: | FileCheck --check-prefix=DUMP %s |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 | 94 |
95 ; Test for _Z<len><str> where <len> is -1. LLVM explicitly allows the | 95 ; Test for _Z<len><str> where <len> is -1. LLVM explicitly allows the |
96 ; '-' character in identifiers. | 96 ; '-' character in identifiers. |
97 | 97 |
98 define internal void @_Z-1FuncCPlusPlusi(i32 %i) { | 98 define internal void @_Z-1FuncCPlusPlusi(i32 %i) { |
99 entry: | 99 entry: |
100 ret void | 100 ret void |
101 } | 101 } |
102 ; MANGLE: Subzero_Z-1FuncCPlusPlusi: | 102 ; MANGLE: Subzero_Z-1FuncCPlusPlusi: |
103 | 103 |
104 | |
105 ; Test for substitution incrementing. This single test captures: | |
106 ; S<num>_ ==> S<num+1>_ for single-digit <num> | |
107 ; S_ ==> S0_ | |
108 ; String length increase, e.g. SZZZ_ ==> S0000_ | |
wala
2014/07/11 21:21:56
The successor of ZZZ in base 36 is 1000. Why 0000
| |
109 ; At least one digit wrapping without length increase, e.g. SZ9ZZ_ ==> SZA00_ | |
110 ; Unrelated identifiers containing S[0-9A-Z]* , e.g. MyClassS1x | |
111 ; A proper substring of S<num>_ at the end of the string | |
112 ; (to test parser edge cases) | |
113 | |
114 define internal void @_Z3fooP10MyClassS1xP10MyClassS2xRS_RS1_S_S1_SZZZ_SZ9ZZ_S12 345() { | |
115 ; MANGLE: _ZN7Subzero3fooEP10MyClassS1xP10MyClassS2xRS0_RS2_S0_S2_S0000_SZA00_ S12345: | |
116 entry: | |
117 ret void | |
118 } | |
119 | |
120 ; Test that unmangled (non-C++) strings don't have substitutions updated. | |
121 define internal void @foo_S_S0_SZ_S() { | |
122 ; MANGLE: Subzerofoo_S_S0_SZ_S: | |
123 entry: | |
124 ret void | |
125 } | |
126 | |
104 ; ERRORS-NOT: ICE translation error | 127 ; ERRORS-NOT: ICE translation error |
105 ; DUMP-NOT: SZ | 128 ; DUMP-NOT: SZ |
OLD | NEW |