Adjustments to support the new ConstantAggregateZero class

llvm-svn: 11474
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 5fc7a89..29adfd0 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -288,12 +288,9 @@
            "assuming that double is 64 bits!");
     Out << "0x" << utohexstr(*(uint64_t*)Ptr);
 
+  } else if (isa<ConstantAggregateZero>(CV)) {
+    Out << "zeroinitializer";
   } else if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV)) {
-    if (CA->getNumOperands() > 5 && CA->isNullValue()) {
-      Out << "zeroinitializer";
-      return;
-    }
-
     // As a special case, print the array as a string if it is an array of
     // ubytes or an array of sbytes with positive values.
     // 
@@ -339,11 +336,6 @@
       Out << " ]";
     }
   } else if (const ConstantStruct *CS = dyn_cast<ConstantStruct>(CV)) {
-    if (CS->getNumOperands() > 5 && CS->isNullValue()) {
-      Out << "zeroinitializer";
-      return;
-    }
-
     Out << "{";
     if (CS->getNumOperands()) {
       Out << " ";