rendered paste bodyIndex: test/CodeGen/writable-strings.c
===================================================================
--- test/CodeGen/writable-strings.c (revision 0)
+++ test/CodeGen/writable-strings.c (revision 0)
@@ -0,0 +1,8 @@
+// RUN: clang -emit-llvm -fwritable-string %s
+
+int main() {
+ char *str = "abc";
+ str[0] = '1';
+ printf("%s", str);
+}
+
Index: test/CodeGen/shared-string-literals.c
===================================================================
--- test/CodeGen/shared-string-literals.c (revision 0)
+++ test/CodeGen/shared-string-literals.c (revision 0)
@@ -0,0 +1,9 @@
+// RUN: clang -emit-llvm %s
+
+char *globalString = "abc";
+char *globalStringArray[5] = { "123", "abc" };
+char *anotherGlobalString = "123";
+
+int main() {
+ printf("123");
+}