aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/writable-strings.c
diff options
context:
space:
mode:
authorOliver Hunt <oliver@apple.com>2007-11-28 06:27:12 +0000
committerOliver Hunt <oliver@apple.com>2007-11-28 06:27:12 +0000
commit01acb91affa1544a8c64e5ca5546e33d42b565cc (patch)
tree371a9779d5bbebc61a7e150d23190b2a10895e00 /test/CodeGen/writable-strings.c
parent5df6070d62ac4ed7e0dc17e3f0c5ef7b3cf3f84e (diff)
Adding code gen tests for writable and shared string literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/writable-strings.c')
-rw-r--r--test/CodeGen/writable-strings.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/writable-strings.c b/test/CodeGen/writable-strings.c
new file mode 100644
index 0000000000..64b2492936
--- /dev/null
+++ b/test/CodeGen/writable-strings.c
@@ -0,0 +1,8 @@
+// RUN: clang -emit-llvm -fwritable-string %s
+
+int main() {
+ char *str = "abc";
+ str[0] = '1';
+ printf("%s", str);
+}
+