Cleanup comparisons to VariableArrayType::Static for non-VLAs
authorHal Finkel <hfinkel@anl.gov>
Sat, 19 Jul 2014 02:13:40 +0000 (02:13 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 19 Jul 2014 02:13:40 +0000 (02:13 +0000)
The enum is part of ArrayType, so there is no functional change, but comparing
to ArrayType::Static for non-VLAs makes more sense.

llvm-svn: 213446

clang/lib/AST/TypePrinter.cpp
clang/lib/CodeGen/CGCall.cpp

index d06bfbd..061473e 100644 (file)
@@ -436,7 +436,7 @@ void TypePrinter::printConstantArrayAfter(const ConstantArrayType *T,
     OS << ' ';
   }
 
-  if (T->getSizeModifier() == VariableArrayType::Static)
+  if (T->getSizeModifier() == ArrayType::Static)
     OS << "static ";
 
   OS << T->getSize().getZExtValue() << ']';
index f15c1b7..17c3354 100644 (file)
@@ -1500,7 +1500,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
             // indicates dereferenceability, and if the size is constant we can
             // use the dereferenceable attribute (which requires the size in
             // bytes).
-            if (ArrTy->getSizeModifier() == VariableArrayType::Static) {
+            if (ArrTy->getSizeModifier() == ArrayType::Static) {
               QualType ETy = ArrTy->getElementType();
               uint64_t ArrSize = ArrTy->getSize().getZExtValue();
               if (!ETy->isIncompleteType() && ETy->isConstantSizeType() &&