]> granicus.if.org Git - clang/commitdiff
Add two small utility functions to PCHReader that the writer will use. WIP.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Tue, 13 Jul 2010 20:12:07 +0000 (20:12 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Tue, 13 Jul 2010 20:12:07 +0000 (20:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108267 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/PCHReader.h

index 38402732a342fb093dcfe22187b59e12033966a8..461d254817d52639ec07dceafda38d2c44e8dd23 100644 (file)
@@ -602,6 +602,16 @@ public:
   /// \brief Read preprocessed entities into the 
   virtual void ReadPreprocessedEntities();
 
+  /// \brief Returns the number of types found in this file.
+  unsigned getTotalNumTypes() const {
+    return static_cast<unsigned>(TypesLoaded.size());
+  }
+
+  /// \brief Returns the number of declarations found in this file.
+  unsigned getTotalNumDecls() const {
+    return static_cast<unsigned>(DeclsLoaded.size());
+  }
+
   /// \brief Reads a TemplateArgumentLocInfo appropriate for the
   /// given TemplateArgument kind.
   TemplateArgumentLocInfo