]> granicus.if.org Git - clang/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213446 91177308-0d34-0410-b5e6-96231b3b80d8

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

index d06bfbdb7a7912a4a2f0c74a9e608319194c7be5..061473eb848d92b28d8985b13d36528dabb3362c 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 f15c1b7321afae9ea9cbea291ee5f235317e5ba0..17c3354f93e9cfdbbe231196bcb5535da903ed2a 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() &&