clang API Documentation

Public Member Functions
clang::PragmaHandler Class Reference

#include <Pragma.h>

Inheritance diagram for clang::PragmaHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PragmaHandler (StringRef name)
 PragmaHandler ()
virtual ~PragmaHandler ()
StringRef getName () const
virtual void HandlePragma (Preprocessor &PP, PragmaIntroducerKind Introducer, Token &FirstToken)=0
virtual PragmaNamespacegetIfNamespace ()

Detailed 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.

Definition at line 59 of file Pragma.h.


Constructor & Destructor Documentation

clang::PragmaHandler::PragmaHandler ( StringRef  name) [inline, explicit]

Definition at line 62 of file Pragma.h.

Definition at line 63 of file Pragma.h.

Definition at line 33 of file Pragma.cpp.


Member Function Documentation

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]
virtual void clang::PragmaHandler::HandlePragma ( Preprocessor PP,
PragmaIntroducerKind  Introducer,
Token FirstToken 
) [pure virtual]

The documentation for this class was generated from the following files: