Implement codegen for the following static var init.
void g() {
static char a[10];
static char *b = a;
}
Now we can compile wget!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47627 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/staticinit.c b/test/CodeGen/staticinit.c
index e226179..50c837a 100644
--- a/test/CodeGen/staticinit.c
+++ b/test/CodeGen/staticinit.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s
+// RUN: clang -emit-llvm < %s | grep "g.b = internal global i8. getelementptr"
struct AStruct {
int i;
@@ -13,3 +13,8 @@
static char* strs[] = { "one", "two", "three", "four" };
static struct AStruct myStruct = { 1, "two", 3.0 };
}
+
+void g() {
+ static char a[10];
+ static char *b = a;
+}