From 77a3c9ede5cdb26b5eb3001e82bb0a36ca997e1f Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Tue, 13 Jul 2010 20:12:07 +0000 Subject: [PATCH] Add two small utility functions to PCHReader that the writer will use. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108267 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/PCHReader.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h index 38402732a3..461d254817 100644 --- a/include/clang/Frontend/PCHReader.h +++ b/include/clang/Frontend/PCHReader.h @@ -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(TypesLoaded.size()); + } + + /// \brief Returns the number of declarations found in this file. + unsigned getTotalNumDecls() const { + return static_cast(DeclsLoaded.size()); + } + /// \brief Reads a TemplateArgumentLocInfo appropriate for the /// given TemplateArgument kind. TemplateArgumentLocInfo -- 2.40.0