r213446 - Cleanup comparisons to VariableArrayType::Static for non-VLAs

Hal Finkel hfinkel at anl.gov
Fri Jul 18 19:13:40 PDT 2014


Author: hfinkel
Date: Fri Jul 18 21:13:40 2014
New Revision: 213446

URL: http://llvm.org/viewvc/llvm-project?rev=213446&view=rev
Log:
Cleanup comparisons to VariableArrayType::Static for non-VLAs

The enum is part of ArrayType, so there is no functional change, but comparing
to ArrayType::Static for non-VLAs makes more sense.

Modified:
    cfe/trunk/lib/AST/TypePrinter.cpp
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/AST/TypePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=213446&r1=213445&r2=213446&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)
+++ cfe/trunk/lib/AST/TypePrinter.cpp Fri Jul 18 21:13:40 2014
@@ -436,7 +436,7 @@ void TypePrinter::printConstantArrayAfte
     OS << ' ';
   }
 
-  if (T->getSizeModifier() == VariableArrayType::Static)
+  if (T->getSizeModifier() == ArrayType::Static)
     OS << "static ";
 
   OS << T->getSize().getZExtValue() << ']';

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=213446&r1=213445&r2=213446&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Jul 18 21:13:40 2014
@@ -1500,7 +1500,7 @@ void CodeGenFunction::EmitFunctionProlog
             // 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() &&





More information about the cfe-commits mailing list