Explicitly set the string literal type from "char *" to "constant array of char".

At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.

That said, I've commented out the two lines in globalinit.c that are causing problems.

Chris, please have a look...thanks!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44823 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 1290975..c77496f 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -576,6 +576,8 @@
         // Return a new array type (C99 6.7.8p22).
         DeclType = Context.getConstantArrayType(VAT->getElementType(), ConstVal, 
                                                 ArrayType::Normal, 0);
+        // set type from "char *" to "constant array of char".
+        strLiteral->setType(DeclType); 
         return hadError;
       }
       const ConstantArrayType *CAT = DeclType->getAsConstantArrayType();
@@ -586,6 +588,8 @@
                diag::warn_initializer_string_for_char_array_too_long,
                strLiteral->getSourceRange());
         }
+        // set type from "char *" to "constant array of char".
+        strLiteral->setType(DeclType); 
         return hadError;
       }
     }