aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHReader.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-17 00:04:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-17 00:04:06 +0000
commit025452fa0eda63e150cfaeebe64f0a19c96b3a06 (patch)
tree187c0527f4fdd7743381dc30f67fc6bfa7852c07 /include/clang/Frontend/PCHReader.h
parent363c184139e26ea38223b477ad64ee67b22bb9a7 (diff)
PCH support for the first batch of statements, including null,
compound, case, default, if, switch, and break statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PCHReader.h')
-rw-r--r--include/clang/Frontend/PCHReader.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h
index 995a1d563f..07531df1f3 100644
--- a/include/clang/Frontend/PCHReader.h
+++ b/include/clang/Frontend/PCHReader.h
@@ -26,6 +26,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Support/DataTypes.h"
+#include <map>
#include <string>
#include <utility>
#include <vector>
@@ -41,6 +42,7 @@ class Attr;
class Decl;
class DeclContext;
class Preprocessor;
+class SwitchCase;
/// \brief Reads a precompiled head containing the contents of a
/// translation unit.
@@ -126,6 +128,10 @@ private:
/// file.
llvm::SmallVector<uint64_t, 16> ExternalDefinitions;
+ /// \brief Mapping from switch-case IDs in the PCH file to
+ /// switch-case statements.
+ std::map<unsigned, SwitchCase *> SwitchCaseStmts;
+
PCHReadResult ReadPCHBlock();
bool CheckPredefinesBuffer(const char *PCHPredef,
unsigned PCHPredefLen,
@@ -241,6 +247,13 @@ public:
/// \brief Retrieve the AST context that this PCH reader
/// supplements.
ASTContext &getContext() { return Context; }
+
+ /// \brief Record that the given ID maps to the given switch-case
+ /// statement.
+ void RecordSwitchCaseID(SwitchCase *SC, unsigned ID);
+
+ /// \brief Retrieve the switch-case statement with the given ID.
+ SwitchCase *getSwitchCaseWithID(unsigned ID);
};
} // end namespace clang