class PragmaHandler
Declaration
class PragmaHandler { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/Lex/Pragma.h:65
Member Variables
- private std::string Name
Method Overview
- public virtual void HandlePragma(clang::Preprocessor & PP, clang::PragmaIntroducer Introducer, clang::Token & FirstToken)
- public PragmaHandler()
- public PragmaHandler(llvm::StringRef name)
- public virtual clang::PragmaNamespace * getIfNamespace()
- public llvm::StringRef getName() const
- public virtual ~PragmaHandler()
Methods
¶virtual void HandlePragma(
clang::Preprocessor& PP,
clang::PragmaIntroducer Introducer,
clang::Token& FirstToken)
virtual void HandlePragma(
clang::Preprocessor& PP,
clang::PragmaIntroducer Introducer,
clang::Token& FirstToken)
Declared at: clang/include/clang/Lex/Pragma.h:74
Parameters
- clang::Preprocessor& PP
- clang::PragmaIntroducer Introducer
- clang::Token& FirstToken
¶PragmaHandler()
PragmaHandler()
Declared at: clang/include/clang/Lex/Pragma.h:69
¶PragmaHandler(llvm::StringRef name)
PragmaHandler(llvm::StringRef name)
Declared at: clang/include/clang/Lex/Pragma.h:70
Parameters
- llvm::StringRef name
¶virtual clang::PragmaNamespace* getIfNamespace()
virtual clang::PragmaNamespace* getIfNamespace()
Description
getIfNamespace - If this is a namespace, return it. This is equivalent to using a dynamic_cast, but doesn't require RTTI.
Declared at: clang/include/clang/Lex/Pragma.h:79
¶llvm::StringRef getName() const
llvm::StringRef getName() const
Declared at: clang/include/clang/Lex/Pragma.h:73
¶virtual ~PragmaHandler()
virtual ~PragmaHandler()
Declared at: clang/include/clang/Lex/Pragma.h:71