diff options
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 8 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 17 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 4 | ||||
-rw-r--r-- | include/clang/Serialization/GlobalModuleIndex.h | 5 |
4 files changed, 33 insertions, 1 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index 9b685ba..81f8980 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -951,6 +951,8 @@ namespace clang { DECL_OBJC_PROPERTY_IMPL, /// \brief A FieldDecl record. DECL_FIELD, + /// \brief A MSPropertyDecl record. + DECL_MS_PROPERTY, /// \brief A VarDecl record. DECL_VAR, /// \brief An ImplicitParamDecl record. @@ -961,6 +963,8 @@ namespace clang { DECL_FILE_SCOPE_ASM, /// \brief A BlockDecl record. DECL_BLOCK, + /// \brief A CapturedDecl record. + DECL_CAPTURED, /// \brief A record that stores the set of declarations that are /// lexically stored within a given DeclContext. /// @@ -1101,6 +1105,8 @@ namespace clang { STMT_RETURN, /// \brief A DeclStmt record. STMT_DECL, + /// \brief A CapturedStmt record. + STMT_CAPTURED, /// \brief A GCC-style AsmStmt record. STMT_GCCASM, /// \brief A MS-style AsmStmt record. @@ -1261,6 +1267,7 @@ namespace clang { EXPR_CXX_THIS, // CXXThisExpr EXPR_CXX_THROW, // CXXThrowExpr EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr + EXPR_CXX_DEFAULT_INIT, // CXXDefaultInitExpr EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr @@ -1300,6 +1307,7 @@ namespace clang { EXPR_ASTYPE, // AsTypeExpr // Microsoft + EXPR_CXX_PROPERTY_REF_EXPR, // MSPropertyRefExpr EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr). EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type). STMT_SEH_EXCEPT, // SEHExceptStmt diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 9255336..2c0102e 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -172,6 +172,16 @@ public: /// \brief Receives __COUNTER__ value. virtual void ReadCounter(const serialization::ModuleFile &M, unsigned Value) {} + + /// \brief Returns true if this \c ASTReaderListener wants to receive the + /// input files of the AST file via \c visitInputFile, false otherwise. + virtual bool needsInputFileVisitation() { return false; } + + /// \brief if \c needsInputFileVisitation returns true, this is called for each + /// input file of the AST file. + /// + /// \returns true to continue receiving the next input file, false to stop. + virtual bool visitInputFile(StringRef Filename, bool isSystem) { return true;} }; /// \brief ASTReaderListener implementation to validate the information of @@ -1106,6 +1116,8 @@ private: void finishPendingActions(); + void pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name); + void addPendingDeclContextInfo(Decl *D, serialization::GlobalDeclID SemaDC, serialization::GlobalDeclID LexicalDC) { @@ -1558,7 +1570,7 @@ public: /// \brief Retrieve an iterator into the set of all identifiers /// in all loaded AST files. - virtual IdentifierIterator *getIdentifiers() const; + virtual IdentifierIterator *getIdentifiers(); /// \brief Load the contents of the global method pool for a given /// selector. @@ -1800,6 +1812,9 @@ public: /// \brief Reads a sub-expression operand during statement reading. Expr *ReadSubExpr(); + /// \brief Reads a token out of a record. + Token ReadToken(ModuleFile &M, const RecordData &Record, unsigned &Idx); + /// \brief Reads the macro record located at the given offset. MacroInfo *ReadMacroRecord(ModuleFile &F, uint64_t Offset); diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 2938dc7..8ac8fde 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -63,6 +63,7 @@ class Sema; class SourceManager; class SwitchCase; class TargetInfo; +class Token; class VersionTuple; class ASTUnresolvedSet; @@ -498,6 +499,9 @@ public: Module *WritingModule, StringRef isysroot, bool hasErrors = false); + /// \brief Emit a token. + void AddToken(const Token &Tok, RecordDataImpl &Record); + /// \brief Emit a source location. void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record); diff --git a/include/clang/Serialization/GlobalModuleIndex.h b/include/clang/Serialization/GlobalModuleIndex.h index eaf26d1..ab91f40 100644 --- a/include/clang/Serialization/GlobalModuleIndex.h +++ b/include/clang/Serialization/GlobalModuleIndex.h @@ -146,6 +146,11 @@ public: static std::pair<GlobalModuleIndex *, ErrorCode> readIndex(StringRef Path); + /// \brief Returns an iterator for identifiers stored in the index table. + /// + /// The caller accepts ownership of the returned object. + IdentifierIterator *createIdentifierIterator() const; + /// \brief Retrieve the set of modules that have up-to-date indexes. /// /// \param ModuleFiles Will be populated with the set of module files that |