aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-28 14:54:22 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-28 14:54:22 +0000
commit5b9dc7caaef0469babc45dd8e713727a136ce517 (patch)
treee201294a92fd8da77fad8c461f7aa2dc18066dce /include/clang
parent8451ec7e709baf777bec07dc70653e0c523dd120 (diff)
Make Sema::ReferencedSelectors lazily deserialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Sema/ExternalSemaSource.h12
-rw-r--r--include/clang/Serialization/ASTReader.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/include/clang/Sema/ExternalSemaSource.h b/include/clang/Sema/ExternalSemaSource.h
index c9da3fefbb..d8d6abb650 100644
--- a/include/clang/Sema/ExternalSemaSource.h
+++ b/include/clang/Sema/ExternalSemaSource.h
@@ -125,7 +125,17 @@ public:
/// to introduce the same declarations repeatedly.
virtual void ReadLocallyScopedExternalDecls(
SmallVectorImpl<NamedDecl *> &Decls) {}
-
+
+ /// \brief Read the set of referenced selectors known to the
+ /// external Sema source.
+ ///
+ /// The external source should append its own referenced selectors to the
+ /// given vector of declarations. Note that this routine
+ /// may be invoked multiple times; the external source should take care not
+ /// to introduce the same selectors repeatedly.
+ virtual void ReadReferencedSelectors(
+ SmallVectorImpl<std::pair<Selector, SourceLocation> > &Sels) {}
+
// isa/cast/dyn_cast support
static bool classof(const ExternalASTSource *Source) {
return Source->SemaSource;
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 7de5ec1ffc..0113e6f98d 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -1391,6 +1391,9 @@ public:
virtual void ReadLocallyScopedExternalDecls(
SmallVectorImpl<NamedDecl *> &Decls);
+ virtual void ReadReferencedSelectors(
+ SmallVectorImpl<std::pair<Selector, SourceLocation> > &Sels);
+
/// \brief Load a selector from disk, registering its ID if it exists.
void LoadSelector(Selector Sel);