aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-14 01:54:56 +0000
committerChris Lattner <sabre@nondot.org>2009-06-14 01:54:56 +0000
commit1b63e4f732dbc73d90abf886b4d21f8e3a165f6d (patch)
treeceacec3ea792cf65e407e1c2988ef31a9d1bc359 /include/clang/Lex/Preprocessor.h
parent6b15cdc1312f8fc45c86ee75e2a85106700e97f6 (diff)
Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 4831b9bb25..f229881bfc 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -19,6 +19,7 @@
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/TokenLexer.h"
#include "clang/Lex/PTHManager.h"
+#include "clang/Basic/Builtins.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
@@ -101,6 +102,9 @@ class Preprocessor {
/// the lifetime fo the preprocessor.
SelectorTable Selectors;
+ /// BuiltinInfo - Information about builtins.
+ Builtin::Context BuiltinInfo;
+
/// PragmaHandlers - This tracks all of the pragmas that the client registered
/// with this preprocessor.
PragmaNamespace *PragmaHandlers;
@@ -211,6 +215,7 @@ public:
IdentifierTable &getIdentifierTable() { return Identifiers; }
SelectorTable &getSelectorTable() { return Selectors; }
+ Builtin::Context &getBuiltinInfo() { return BuiltinInfo; }
llvm::BumpPtrAllocator &getPreprocessorAllocator() { return BP; }
void setPTHManager(PTHManager* pm);