clang API Documentation
#include <Pragma.h>
Public Member Functions | |
PragmaNamespace (StringRef Name) | |
virtual | ~PragmaNamespace () |
PragmaHandler * | FindHandler (StringRef Name, bool IgnoreNull=true) const |
void | AddPragma (PragmaHandler *Handler) |
void | RemovePragmaHandler (PragmaHandler *Handler) |
bool | IsEmpty () |
void | HandlePragma (Preprocessor &PP, PragmaIntroducerKind Introducer, Token &FirstToken) override |
PragmaNamespace * | getIfNamespace () override |
PragmaNamespace - This PragmaHandler subdivides the namespace of pragmas, allowing hierarchical pragmas to be defined. Common examples of namespaces are "\#pragma GCC", "\#pragma STDC", and "\#pragma omp", but any namespaces may be (potentially recursively) defined.
clang::PragmaNamespace::PragmaNamespace | ( | StringRef | Name | ) | [inline, explicit] |
PragmaNamespace::~PragmaNamespace | ( | ) | [virtual] |
Definition at line 50 of file Pragma.cpp.
void PragmaNamespace::AddPragma | ( | PragmaHandler * | Handler | ) |
AddPragma - Add a pragma to this namespace.
Definition at line 65 of file Pragma.cpp.
References clang::PragmaHandler::getName().
Referenced by clang::Preprocessor::AddPragmaHandler().
PragmaHandler * PragmaNamespace::FindHandler | ( | StringRef | Name, |
bool | IgnoreNull = true |
||
) | const |
FindHandler - Check to see if there is already a handler for the specified name. If not, return the handler for the null name if it exists, otherwise return null. If IgnoreNull is true (the default) then the null handler isn't returned on failure to match.
FindHandler - Check to see if there is already a handler for the specified name. If not, return the handler for the null identifier if it exists, otherwise return null. If IgnoreNull is true (the default) then the null handler isn't returned on failure to match.
Definition at line 58 of file Pragma.cpp.
Referenced by clang::Preprocessor::AddPragmaHandler(), HandlePragma(), and clang::Preprocessor::IgnorePragmas().
PragmaNamespace* clang::PragmaNamespace::getIfNamespace | ( | ) | [inline, override, virtual] |
getIfNamespace - If this is a namespace, return it. This is equivalent to using a dynamic_cast, but doesn't require RTTI.
Reimplemented from clang::PragmaHandler.
Definition at line 120 of file Pragma.h.
Referenced by clang::Preprocessor::AddPragmaHandler(), and clang::Preprocessor::IgnorePragmas().
void PragmaNamespace::HandlePragma | ( | Preprocessor & | PP, |
PragmaIntroducerKind | Introducer, | ||
Token & | FirstToken | ||
) | [override, virtual] |
Implements clang::PragmaHandler.
Definition at line 79 of file Pragma.cpp.
References clang::Preprocessor::Diag(), FindHandler(), clang::Token::getIdentifierInfo(), clang::IdentifierInfo::getName(), clang::PragmaHandler::HandlePragma(), and clang::Preprocessor::LexUnexpandedToken().
bool clang::PragmaNamespace::IsEmpty | ( | ) | [inline] |
Definition at line 113 of file Pragma.h.
Referenced by clang::Preprocessor::RemovePragmaHandler().
void PragmaNamespace::RemovePragmaHandler | ( | PragmaHandler * | Handler | ) |
RemovePragmaHandler - Remove the given handler from the namespace.
Definition at line 73 of file Pragma.cpp.
References clang::PragmaHandler::getName().
Referenced by clang::Preprocessor::RemovePragmaHandler().