Correctly handle designated initializers which modify an array initialized
with a string.  This case is sort of tricky because we can't modify the
StringLiteral used to represent such initializers.
We are forced to decompose the string into individual characters.

Fixes <rdar://problem/10465114>.

llvm-svn: 183791
diff --git a/clang/test/CodeGenObjC/designated-initializers.m b/clang/test/CodeGenObjC/designated-initializers.m
new file mode 100644
index 0000000..80dfdf3
--- /dev/null
+++ b/clang/test/CodeGenObjC/designated-initializers.m
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+
+// <rdar://problem/10465114>
+struct overwrite_string_struct {
+  char L[3];
+  int M;
+} overwrite_string[] = { { { @encode(void**) }, 1 }, [0].L[1] = 'x'};
+// CHECK: [3 x i8] c"^xv", i32 1