clang API Documentation
#include <Pragma.h>
Public Member Functions | |
PragmaHandler (StringRef name) | |
PragmaHandler () | |
virtual | ~PragmaHandler () |
StringRef | getName () const |
virtual void | HandlePragma (Preprocessor &PP, PragmaIntroducerKind Introducer, Token &FirstToken)=0 |
virtual PragmaNamespace * | getIfNamespace () |
PragmaHandler - Instances of this interface defined to handle the various pragmas that the language front-end uses. Each handler optionally has a name (e.g. "pack") and the HandlePragma method is invoked when a pragma with that identifier is found. If a handler does not match any of the declared pragmas the handler with a null identifier is invoked, if it exists.
Note that the PragmaNamespace class can be used to subdivide pragmas, e.g. we treat "\#pragma STDC" and "\#pragma GCC" as namespaces that contain other pragmas.
clang::PragmaHandler::PragmaHandler | ( | StringRef | name | ) | [inline, explicit] |
clang::PragmaHandler::PragmaHandler | ( | ) | [inline] |
PragmaHandler::~PragmaHandler | ( | ) | [virtual] |
Definition at line 33 of file Pragma.cpp.
virtual PragmaNamespace* clang::PragmaHandler::getIfNamespace | ( | ) | [inline, virtual] |
getIfNamespace - If this is a namespace, return it. This is equivalent to using a dynamic_cast, but doesn't require RTTI.
Reimplemented in clang::PragmaNamespace.
Definition at line 72 of file Pragma.h.
Referenced by clang::Preprocessor::RemovePragmaHandler().
StringRef clang::PragmaHandler::getName | ( | ) | const [inline] |
Definition at line 66 of file Pragma.h.
Referenced by clang::PragmaNamespace::AddPragma(), clang::Preprocessor::AddPragmaHandler(), and clang::PragmaNamespace::RemovePragmaHandler().
virtual void clang::PragmaHandler::HandlePragma | ( | Preprocessor & | PP, |
PragmaIntroducerKind | Introducer, | ||
Token & | FirstToken | ||
) | [pure virtual] |
Implemented in clang::PragmaNamespace, and clang::EmptyPragmaHandler.
Referenced by clang::PragmaNamespace::HandlePragma().