aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHReader.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-17 18:18:49 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-17 18:18:49 +0000
commit1de05feeeafe5b215fe7617594a7076a5192a6e2 (patch)
tree1adf57ca6434d22306af1104eb07a242c797760e /include/clang/Frontend/PCHReader.h
parent5abd66ff444d31bd0537d8151b1abf354cfcb1af (diff)
PCH support for labels and goto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PCHReader.h')
-rw-r--r--include/clang/Frontend/PCHReader.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h
index 07531df1f3..c573797693 100644
--- a/include/clang/Frontend/PCHReader.h
+++ b/include/clang/Frontend/PCHReader.h
@@ -41,6 +41,8 @@ class ASTContext;
class Attr;
class Decl;
class DeclContext;
+class GotoStmt;
+class LabelStmt;
class Preprocessor;
class SwitchCase;
@@ -132,6 +134,15 @@ private:
/// switch-case statements.
std::map<unsigned, SwitchCase *> SwitchCaseStmts;
+ /// \brief Mapping from label statement IDs in the PCH file to label
+ /// statements.
+ std::map<unsigned, LabelStmt *> LabelStmts;
+
+ /// \brief Mapping from label IDs to the set of "goto" statements
+ /// that point to that label before the label itself has been
+ /// de-serialized.
+ std::multimap<unsigned, GotoStmt *> UnresolvedGotoStmts;
+
PCHReadResult ReadPCHBlock();
bool CheckPredefinesBuffer(const char *PCHPredef,
unsigned PCHPredefLen,
@@ -254,6 +265,19 @@ public:
/// \brief Retrieve the switch-case statement with the given ID.
SwitchCase *getSwitchCaseWithID(unsigned ID);
+
+ /// \brief Record that the given label statement has been
+ /// deserialized and has the given ID.
+ void RecordLabelStmt(LabelStmt *S, unsigned ID);
+
+ /// \brief Set the label of the given statement to the label
+ /// identified by ID.
+ ///
+ /// Depending on the order in which the label and other statements
+ /// referencing that label occur, this operation may complete
+ /// immediately (updating the statement) or it may queue the
+ /// statement to be back-patched later.
+ void SetLabelOf(GotoStmt *S, unsigned ID);
};
} // end namespace clang