aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-27 23:01:28 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-27 23:01:28 +0000
commit083abdf67f157e9d2ab5a8c9d5e71240479d3c99 (patch)
treedd52ace29b99fccabcd6afaf4cac3a36c4b265f4 /include/clang
parenta6d6af308bfc9b72467b432a045a9fc6673e3821 (diff)
Record macros in dependent PCHs. Also add various info tables to dependent PCHs; tests for this to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Lex/MacroInfo.h9
-rw-r--r--include/clang/Lex/Preprocessor.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h
index 5887041c46..6d5896c2d5 100644
--- a/include/clang/Lex/MacroInfo.h
+++ b/include/clang/Lex/MacroInfo.h
@@ -62,6 +62,9 @@ class MacroInfo {
/// it has not yet been redefined or undefined.
bool IsBuiltinMacro : 1;
+ /// IsFromPCH - True if this macro was loaded from a PCH file.
+ bool IsFromPCH : 1;
+
private:
//===--------------------------------------------------------------------===//
// State that changes as the macro is used.
@@ -172,6 +175,12 @@ public:
/// __LINE__, which requires processing before expansion.
bool isBuiltinMacro() const { return IsBuiltinMacro; }
+ /// isFromPCH - Return true if this macro was loaded from a PCH file.
+ bool isFromPCH() const { return IsFromPCH; }
+
+ /// setIsFromPCH - Set whether this macro was loaded from a PCH file.
+ void setIsFromPCH(bool FromPCH = true) { IsFromPCH = FromPCH; }
+
/// isUsed - Return false if this macro is defined in the main file and has
/// not yet been used.
bool isUsed() const { return IsUsed; }
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index debba38a70..6fd19437f8 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -117,7 +117,7 @@ class Preprocessor {
/// conceptually similar the IdentifierTable. In addition, the current control
/// flow (in clang::ParseAST()), make it convenient to put here.
/// FIXME: Make sure the lifetime of Identifiers/Selectors *isn't* tied to
- /// the lifetime fo the preprocessor.
+ /// the lifetime of the preprocessor.
SelectorTable Selectors;
/// BuiltinInfo - Information about builtins.