From 170464b7c0a2c0c86f2821f14a46f0d540cb5e94 Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Fri, 7 Jan 2011 03:17:31 +0000 Subject: [PATCH] Prefix all attribute enumerators with attr_ for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122992 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Type.h | 20 ++++++++++---------- lib/AST/TypePrinter.cpp | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index d4fdde970e..6b646c5534 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -2694,20 +2694,20 @@ public: // clang::attr::Kind doesn't currently cover the pure type attrs. enum Kind { // Expression operand. - address_space, - regparm, - vector_size, - neon_vector_type, - neon_polyvector_type, + attr_address_space, + attr_regparm, + attr_vector_size, + attr_neon_vector_type, + attr_neon_polyvector_type, - FirstExprOperandKind = address_space, - LastExprOperandKind = neon_polyvector_type, + FirstExprOperandKind = attr_address_space, + LastExprOperandKind = attr_neon_polyvector_type, // Enumerated operand (string or keyword). - objc_gc, + attr_objc_gc, - FirstEnumOperandKind = objc_gc, - LastEnumOperandKind = objc_gc, + FirstEnumOperandKind = attr_objc_gc, + LastEnumOperandKind = attr_objc_gc, // No operand. attr_noreturn, diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 90406b7306..777835640d 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -681,13 +681,13 @@ void TypePrinter::printAttributed(const AttributedType *T, // TODO: not all attributes are GCC-style attributes. S += "__attribute__(("; switch (T->getAttrKind()) { - case AttributedType::address_space: + case AttributedType::attr_address_space: S += "address_space("; S += T->getEquivalentType().getAddressSpace(); S += ")"; break; - case AttributedType::vector_size: { + case AttributedType::attr_vector_size: { S += "__vector_size__("; if (const VectorType *vector =T->getEquivalentType()->getAs()) { S += vector->getNumElements(); @@ -702,9 +702,9 @@ void TypePrinter::printAttributed(const AttributedType *T, break; } - case AttributedType::neon_vector_type: - case AttributedType::neon_polyvector_type: { - if (T->getAttrKind() == AttributedType::neon_vector_type) + case AttributedType::attr_neon_vector_type: + case AttributedType::attr_neon_polyvector_type: { + if (T->getAttrKind() == AttributedType::attr_neon_vector_type) S += "neon_vector_type("; else S += "neon_polyvector_type("; @@ -714,7 +714,7 @@ void TypePrinter::printAttributed(const AttributedType *T, break; } - case AttributedType::regparm: { + case AttributedType::attr_regparm: { S += "regparm("; QualType t = T->getEquivalentType(); while (!t->isFunctionType()) @@ -724,7 +724,7 @@ void TypePrinter::printAttributed(const AttributedType *T, break; } - case AttributedType::objc_gc: { + case AttributedType::attr_objc_gc: { S += "objc_gc("; QualType tmp = T->getEquivalentType(); -- 2.40.0