summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2016-04-04 14:22:58 +0000
committerJohn Brawn <john.brawn@arm.com>2016-04-04 14:22:58 +0000
commit750988f638cde2f5dbfa1d6afd4ff4844304caf7 (patch)
treebc8cb0027004b1f8ed9e3a8a8787fa42ae46cde7 /include/clang/Lex/Preprocessor.h
parentdffb97b7784248a8e340791697392b17fe74de5b (diff)
Add a PragmaHandler Registry for plugins to add PragmaHandlers to
This allows plugins which add AST passes to also define pragmas to do things like only enable certain behaviour of the AST pass in files where a certain pragma is used. Differential Revision: http://reviews.llvm.org/D18319 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index d8e61713b3..f7a9ea9518 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -32,6 +32,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Support/Allocator.h"
+#include "llvm/Support/Registry.h"
#include <memory>
#include <vector>
@@ -1937,6 +1938,9 @@ public:
virtual bool HandleComment(Preprocessor &PP, SourceRange Comment) = 0;
};
+/// \brief Registry of pragma handlers added by plugins
+typedef llvm::Registry<PragmaHandler> PragmaHandlerRegistry;
+
} // end namespace clang
#endif