Do not try calculate the size of forward-declared template type array.

llvm-svn: 128725
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 80bec0f..c7a50ef 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1226,6 +1226,14 @@
   } else if (Ty->isIncompleteArrayType()) {
     Size = 0;
     Align = CGM.getContext().getTypeAlign(Ty->getElementType());
+  } else if (Ty->isDependentSizedArrayType()) {
+    Size = 0;
+    Align = 0;
+  } else if (Ty->getElementType()->getTypeClass() 
+             == Type::TemplateSpecialization) {
+    // FIXME : Emit appropriate element type info.
+    Size = 0;
+    Align = 0;
   } else {
     // Size and align of the whole array, not the element type.
     Size = CGM.getContext().getTypeSize(Ty);