diff options
Diffstat (limited to 'clang/include/clang')
-rw-r--r-- | clang/include/clang/AST/Decl.h | 8 | ||||
-rw-r--r-- | clang/include/clang/Frontend/PCHBitCodes.h | 4 | ||||
-rw-r--r-- | clang/include/clang/Frontend/PCHReader.h | 8 | ||||
-rw-r--r-- | clang/include/clang/Frontend/PCHWriter.h | 3 |
4 files changed, 21 insertions, 2 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index f954934898e..f1626890920 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -992,6 +992,8 @@ public: return TagKind(TagDeclKind); } + void setTagKind(TagKind TK) { TagDeclKind = TK; } + bool isStruct() const { return getTagKind() == TK_struct; } bool isClass() const { return getTagKind() == TK_class; } bool isUnion() const { return getTagKind() == TK_union; } @@ -1013,7 +1015,6 @@ public: return static_cast<TagDecl *>(const_cast<DeclContext*>(DC)); } -protected: void setDefinition(bool V) { IsDefinition = V; } }; @@ -1059,7 +1060,10 @@ public: /// getIntegerType - Return the integer type this enum decl corresponds to. /// This returns a null qualtype for an enum forward definition. QualType getIntegerType() const { return IntegerType; } - + + /// \brief Set the underlying integer type. + void setIntegerType(QualType T) { IntegerType = T; } + static bool classof(const Decl *D) { return D->getKind() == Enum; } static bool classof(const EnumDecl *D) { return true; } diff --git a/clang/include/clang/Frontend/PCHBitCodes.h b/clang/include/clang/Frontend/PCHBitCodes.h index 79d70c8a619..fe3d8ed86c1 100644 --- a/clang/include/clang/Frontend/PCHBitCodes.h +++ b/clang/include/clang/Frontend/PCHBitCodes.h @@ -314,6 +314,10 @@ namespace clang { DECL_TRANSLATION_UNIT = 1, /// \brief A TypedefDecl record. DECL_TYPEDEF, + /// \brief An EnumDecl record. + DECL_ENUM, + /// \brief An EnumConstantDecl record. + DECL_ENUM_CONSTANT, /// \brief A VarDecl record. DECL_VAR, /// \brief A record that stores the set of declarations that are diff --git a/clang/include/clang/Frontend/PCHReader.h b/clang/include/clang/Frontend/PCHReader.h index b59790ddaf4..3490cb50708 100644 --- a/clang/include/clang/Frontend/PCHReader.h +++ b/clang/include/clang/Frontend/PCHReader.h @@ -18,6 +18,8 @@ #include "clang/AST/ExternalASTSource.h" #include "clang/AST/Type.h" #include "clang/Basic/Diagnostic.h" +#include "llvm/ADT/APInt.h" +#include "llvm/ADT/APSInt.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" @@ -201,6 +203,12 @@ public: return DecodeIdentifierInfo(Record[Idx++]); } DeclarationName ReadDeclarationName(const RecordData &Record, unsigned &Idx); + + /// \brief Read an integral value + llvm::APInt ReadAPInt(const RecordData &Record, unsigned &Idx); + + /// \brief Read a signed integral value + llvm::APSInt ReadAPSInt(const RecordData &Record, unsigned &Idx); }; } // end namespace clang diff --git a/clang/include/clang/Frontend/PCHWriter.h b/clang/include/clang/Frontend/PCHWriter.h index 92bab50db59..a899fb43e6e 100644 --- a/clang/include/clang/Frontend/PCHWriter.h +++ b/clang/include/clang/Frontend/PCHWriter.h @@ -112,6 +112,9 @@ public: /// \brief Emit an integral value. void AddAPInt(const llvm::APInt &Value, RecordData &Record); + /// \brief Emit a signed integral value. + void AddAPSInt(const llvm::APSInt &Value, RecordData &Record); + /// \brief Emit a reference to an identifier void AddIdentifierRef(const IdentifierInfo *II, RecordData &Record); |