summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/DeclContextInternals.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DeclContextInternals.h')
-rw-r--r--include/clang/AST/DeclContextInternals.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/clang/AST/DeclContextInternals.h b/include/clang/AST/DeclContextInternals.h
index 32405ee..16cb491 100644
--- a/include/clang/AST/DeclContextInternals.h
+++ b/include/clang/AST/DeclContextInternals.h
@@ -24,6 +24,8 @@
namespace clang {
+class DependentDiagnostic;
+
/// StoredDeclsList - This is an array of decls optimized a common case of only
/// containing one entry.
struct StoredDeclsList {
@@ -258,8 +260,28 @@ public:
}
};
-typedef llvm::DenseMap<DeclarationName, StoredDeclsList> StoredDeclsMap;
+class StoredDeclsMap
+ : public llvm::DenseMap<DeclarationName, StoredDeclsList> {
+
+public:
+ static void DestroyAll(StoredDeclsMap *Map, bool Dependent);
+
+private:
+ friend class ASTContext; // walks the chain deleting these
+ friend class DeclContext;
+ llvm::PointerIntPair<StoredDeclsMap*, 1> Previous;
+};
+class DependentStoredDeclsMap : public StoredDeclsMap {
+public:
+ DependentStoredDeclsMap() : FirstDiagnostic(0) {}
+
+private:
+ friend class DependentDiagnostic;
+ friend class DeclContext; // iterates over diagnostics
+
+ DependentDiagnostic *FirstDiagnostic;
+};
} // end namespace clang
OpenPOWER on IntegriCloud