Author: majnemer Date: Sun Apr 26 22:07:47 2015 New Revision: 235831 URL: http://llvm.org/viewvc/llvm-project?rev=235831&view=rev Log: [MS ABI] Rephrase the mangling of array types in parameters
Make the canonicalization of array types more consistent. Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=235831&r1=235830&r2=235831&view=diff ============================================================================== --- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original) +++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Sun Apr 26 22:07:47 2015 @@ -1379,13 +1379,12 @@ void MicrosoftCXXNameMangler::mangleArgu void *TypePtr; if (const auto *DT = T->getAs<DecayedType>()) { QualType OriginalType = DT->getOriginalType(); - // Decayed ConstantArrayType should be treated identically to decayed - // IncompleteArrayType. - if (const auto *CAT = - getASTContext().getAsConstantArrayType(OriginalType)) + // All decayed ArrayTypes should be treated identically; as-if they were + // a decayed IncompleteArrayType. + if (const auto *AT = getASTContext().getAsArrayType(OriginalType)) OriginalType = getASTContext().getIncompleteArrayType( - CAT->getElementType(), CAT->getSizeModifier(), - CAT->getIndexTypeCVRQualifiers()); + AT->getElementType(), AT->getSizeModifier(), + AT->getIndexTypeCVRQualifiers()); TypePtr = OriginalType.getCanonicalType().getAsOpaquePtr(); // If the original parameter was textually written as an array, _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits