]> granicus.if.org Git - clang/commitdiff
Eliminate pch::TYPE_ATTR, which is never used
authorDouglas Gregor <dgregor@apple.com>
Thu, 16 Apr 2009 02:45:14 +0000 (02:45 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 16 Apr 2009 02:45:14 +0000 (02:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69256 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/PCHBitCodes.h
lib/Frontend/PCHReader.cpp
lib/Frontend/PCHWriter.cpp

index a4a0675df0772b35e1ddda35fe5719b608de64c5..c8b654c6677e213a398662853a2b705c89fda48d 100644 (file)
@@ -260,59 +260,54 @@ namespace clang {
     /// constant describes a record for a specific type class in the
     /// AST.
     enum TypeCode {
-      /// \brief Attributes attached to a type.
-      /// 
-      /// Note that this has the same value as DECL_ATTR, since
-      /// attribute blocks are used for both types and declarations.
-      TYPE_ATTR                     = 1,
       /// \brief An ExtQualType record.
-      TYPE_EXT_QUAL                 = 2,
+      TYPE_EXT_QUAL                 = 1,
       /// \brief A FixedWidthIntType record.
-      TYPE_FIXED_WIDTH_INT          = 3,
+      TYPE_FIXED_WIDTH_INT          = 2,
       /// \brief A ComplexType record.
-      TYPE_COMPLEX                  = 4,
+      TYPE_COMPLEX                  = 3,
       /// \brief A PointerType record.
-      TYPE_POINTER                  = 5,
+      TYPE_POINTER                  = 4,
       /// \brief A BlockPointerType record.
-      TYPE_BLOCK_POINTER            = 6,
+      TYPE_BLOCK_POINTER            = 5,
       /// \brief An LValueReferenceType record.
-      TYPE_LVALUE_REFERENCE         = 7,
+      TYPE_LVALUE_REFERENCE         = 6,
       /// \brief An RValueReferenceType record.
-      TYPE_RVALUE_REFERENCE         = 8,
+      TYPE_RVALUE_REFERENCE         = 7,
       /// \brief A MemberPointerType record.
-      TYPE_MEMBER_POINTER           = 9,
+      TYPE_MEMBER_POINTER           = 8,
       /// \brief A ConstantArrayType record.
-      TYPE_CONSTANT_ARRAY           = 10,
+      TYPE_CONSTANT_ARRAY           = 9,
       /// \brief An IncompleteArrayType record.
-      TYPE_INCOMPLETE_ARRAY         = 11,
+      TYPE_INCOMPLETE_ARRAY         = 10,
       /// \brief A VariableArrayType record.
-      TYPE_VARIABLE_ARRAY           = 12,
+      TYPE_VARIABLE_ARRAY           = 11,
       /// \brief A VectorType record.
-      TYPE_VECTOR                   = 13,
+      TYPE_VECTOR                   = 12,
       /// \brief An ExtVectorType record.
-      TYPE_EXT_VECTOR               = 14,
+      TYPE_EXT_VECTOR               = 13,
       /// \brief A FunctionNoProtoType record.
-      TYPE_FUNCTION_NO_PROTO        = 15,
+      TYPE_FUNCTION_NO_PROTO        = 14,
       /// \brief A FunctionProtoType record.
-      TYPE_FUNCTION_PROTO           = 16,
+      TYPE_FUNCTION_PROTO           = 15,
       /// \brief A TypedefType record.
-      TYPE_TYPEDEF                  = 17,
+      TYPE_TYPEDEF                  = 16,
       /// \brief A TypeOfExprType record.
-      TYPE_TYPEOF_EXPR              = 18,
+      TYPE_TYPEOF_EXPR              = 17,
       /// \brief A TypeOfType record.
-      TYPE_TYPEOF                   = 19,
+      TYPE_TYPEOF                   = 18,
       /// \brief A RecordType record.
-      TYPE_RECORD                   = 20,
+      TYPE_RECORD                   = 19,
       /// \brief An EnumType record.
-      TYPE_ENUM                     = 21,
+      TYPE_ENUM                     = 20,
       /// \brief An ObjCInterfaceType record.
-      TYPE_OBJC_INTERFACE           = 22,
+      TYPE_OBJC_INTERFACE           = 21,
       /// \brief An ObjCQualifiedInterfaceType record.
-      TYPE_OBJC_QUALIFIED_INTERFACE = 23,
+      TYPE_OBJC_QUALIFIED_INTERFACE = 22,
       /// \brief An ObjCQualifiedIdType record.
-      TYPE_OBJC_QUALIFIED_ID        = 24,
+      TYPE_OBJC_QUALIFIED_ID        = 23,
       /// \brief An ObjCQualifiedClassType record.
-      TYPE_OBJC_QUALIFIED_CLASS     = 25
+      TYPE_OBJC_QUALIFIED_CLASS     = 24
     };
 
     /// \brief Record codes for each kind of declaration.
@@ -323,9 +318,6 @@ namespace clang {
     /// in the AST.
     enum DeclCode {
       /// \brief Attributes attached to a declaration.
-      /// 
-      /// Note that this has the same value as TYPE_ATTR, since
-      /// attribute blocks are used for both types and declarations.
       DECL_ATTR = 1,
       /// \brief A TranslationUnitDecl record.
       DECL_TRANSLATION_UNIT,
index e24a155146c8300fda01541a5431bcbc8f52486e..0bc059ed66499efaff843a2d1450e8b9f57e6dc9 100644 (file)
@@ -1270,10 +1270,6 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
   RecordData Record;
   unsigned Code = Stream.ReadCode();
   switch ((pch::TypeCode)Stream.ReadRecord(Code, Record)) {
-  case pch::TYPE_ATTR:
-    assert(false && "Should never jump to an attribute block");
-    return QualType();
-
   case pch::TYPE_EXT_QUAL: {
     assert(Record.size() == 3 && 
            "Incorrect encoding of extended qualifier type");
index c89e3546bf6ee77bd5a469ec2b68d9cf0b9b337d..8adabafae1eef31a310880a1c0cbb5bdafab8263 100644 (file)
@@ -1497,8 +1497,6 @@ void PCHWriter::WriteAttributeRecord(const Attr *Attr) {
     }
   }
 
-  assert((int)pch::DECL_ATTR == (int)pch::TYPE_ATTR && 
-         "DECL_ATTR/TYPE_ATTR mismatch");
   S.EmitRecord(pch::DECL_ATTR, Record);
 }