]> granicus.if.org Git - clang/commitdiff
Prefix all attribute enumerators with attr_ for consistency.
authorFrancois Pichet <pichet2000@gmail.com>
Fri, 7 Jan 2011 03:17:31 +0000 (03:17 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Fri, 7 Jan 2011 03:17:31 +0000 (03:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122992 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h
lib/AST/TypePrinter.cpp

index d4fdde970edb9db6bca13ec030454d35da69e3db..6b646c5534ced78eae53d9090d5df4a40f307eef 100644 (file)
@@ -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,
index 90406b7306d539d023d71101bcfb3fe792dc2d05..777835640d570871669fd8398b2ee1b0dc98b319 100644 (file)
@@ -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<VectorType>()) {
       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();