From: Hal Finkel Date: Sat, 19 Jul 2014 02:13:40 +0000 (+0000) Subject: Cleanup comparisons to VariableArrayType::Static for non-VLAs X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=884314bdcbb9bbab636f09a8dc9da6f6454497b1;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213446 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index d06bfbdb7a..061473eb84 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -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() << ']'; diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index f15c1b7321..17c3354f93 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -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() &&