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/CodeGen/CGDecl.cpp b/CodeGen/CGDecl.cpp
index cd31fa7..c80cecc 100644
--- a/CodeGen/CGDecl.cpp
+++ b/CodeGen/CGDecl.cpp
@@ -77,7 +77,7 @@
   if (D.getInit() == 0) {
     Init = llvm::Constant::getNullValue(LTy);
   } else {
-    Init = CGM.EmitGlobalInit(D.getInit());
+    Init = CGM.EmitConstantExpr(D.getInit(), this);
   }
 
   assert(Init && "Unable to create initialiser for static decl");