commit | 5dae6330bf7d1942fac8173d3200548c502d8b00 | [log] [tgz] |
---|---|---|
author | Oliver Hunt <oliver@apple.com> | Wed Nov 28 06:27:12 2007 +0000 |
committer | Oliver Hunt <oliver@apple.com> | Wed Nov 28 06:27:12 2007 +0000 |
tree | 371a9779d5bbebc61a7e150d23190b2a10895e00 | |
parent | 362e302c7a8ddf092e1465a67e401255374d0386 [diff] [blame] |
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
diff --git a/test/CodeGen/writable-strings.c b/test/CodeGen/writable-strings.c new file mode 100644 index 0000000..64b2492 --- /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); +} +