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.

llvm-svn: 213446
This commit is contained in:
Hal Finkel 2014-07-19 02:13:40 +00:00
parent bfe2d3c0f9
commit 16e394a36c
2 changed files with 2 additions and 2 deletions

View 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() << ']';

View 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() &&