Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: tests_lit/llvm2ice_tests/mangle.ll

Issue 385273002: Subzero: Deal with substitutions in the primitive remangler. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Use "C" locale for isupper(). Remove Valid variable. Clarify S_ ==> S0_. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/mangle.ll
diff --git a/tests_lit/llvm2ice_tests/mangle.ll b/tests_lit/llvm2ice_tests/mangle.ll
index c76a23d1179a6bf960976949f7fb7e8d241f59dd..4271244a204d18ae05c88c6434b14f8f8e6855a7 100644
--- a/tests_lit/llvm2ice_tests/mangle.ll
+++ b/tests_lit/llvm2ice_tests/mangle.ll
@@ -101,5 +101,28 @@ entry:
}
; MANGLE: Subzero_Z-1FuncCPlusPlusi:
+
+; Test for substitution incrementing. This single test captures:
+; S<num>_ ==> S<num+1>_ for single-digit <num>
+; S_ ==> S0_
+; 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
+; At least one digit wrapping without length increase, e.g. SZ9ZZ_ ==> SZA00_
+; Unrelated identifiers containing S[0-9A-Z]* , e.g. MyClassS1x
+; A proper substring of S<num>_ at the end of the string
+; (to test parser edge cases)
+
+define internal void @_Z3fooP10MyClassS1xP10MyClassS2xRS_RS1_S_S1_SZZZ_SZ9ZZ_S12345() {
+; MANGLE: _ZN7Subzero3fooEP10MyClassS1xP10MyClassS2xRS0_RS2_S0_S2_S0000_SZA00_S12345:
+entry:
+ ret void
+}
+
+; Test that unmangled (non-C++) strings don't have substitutions updated.
+define internal void @foo_S_S0_SZ_S() {
+; MANGLE: Subzerofoo_S_S0_SZ_S:
+entry:
+ ret void
+}
+
; ERRORS-NOT: ICE translation error
; DUMP-NOT: SZ
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698