aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/ExternalSemaSource.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-27 21:45:57 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-27 21:45:57 +0000
commita2ee20aa9660851080135219cac5b31fbac08b78 (patch)
treeb70d85a1d1e2cfe2b47ee65ce1ba42c8325212a2 /include/clang/Sema/ExternalSemaSource.h
parentaca25bccefe56121b686706afc84c8cb5d46e65b (diff)
Switch Sema::UnusedFileScopedDecls over to a LazyVector.
- Added LazyVector::erase() to support this use case. - Factored out the LazyDecl-of-Decls to RecordData translation in the ASTWriter. There is still a pile of code duplication here to eliminate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/ExternalSemaSource.h')
-rw-r--r--include/clang/Sema/ExternalSemaSource.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/clang/Sema/ExternalSemaSource.h b/include/clang/Sema/ExternalSemaSource.h
index 1bc479cf4d..e0c7b4f0f0 100644
--- a/include/clang/Sema/ExternalSemaSource.h
+++ b/include/clang/Sema/ExternalSemaSource.h
@@ -18,10 +18,11 @@
namespace clang {
+class DeclaratorDecl;
+class LookupResult;
struct ObjCMethodList;
-class Sema;
class Scope;
-class LookupResult;
+class Sema;
class VarDecl;
/// \brief An abstract interface that should be implemented by
@@ -65,7 +66,7 @@ public:
/// \return true to tell Sema to recover using the LookupResult.
virtual bool LookupUnqualified(LookupResult &R, Scope *S) { return false; }
- /// \brief Read the set of tentative definitions know to the external Sema
+ /// \brief Read the set of tentative definitions known to the external Sema
/// source.
///
/// The external source should append its own tentative definitions to the
@@ -75,6 +76,17 @@ public:
virtual void ReadTentativeDefinitions(
SmallVectorImpl<VarDecl *> &TentativeDefs) {}
+ /// \brief Read the set of unused file-scope declarations known to the
+ /// external Sema source.
+ ///
+ /// The external source should append its own unused, filed-scope 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 declarations repeatedly.
+ virtual void ReadUnusedFileScopedDecls(
+ SmallVectorImpl<const DeclaratorDecl *> &Decls) {}
+
+
// isa/cast/dyn_cast support
static bool classof(const ExternalASTSource *Source) {
return Source->SemaSource;