class PragmaNamespace

Declaration

class PragmaNamespace : public PragmaHandler { /* full declaration omitted */ };

Description

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.

Declared at: clang/include/clang/Lex/Pragma.h:96

Inherits from: PragmaHandler

Member Variables

private llvm::StringMap<std::unique_ptr<PragmaHandler>> Handlers
Handlers - This is a map of the handlers in this namespace with their name as key.

Method Overview

Inherited from PragmaHandler:

Methods

void AddPragma(clang::PragmaHandler* Handler)

Description

AddPragma - Add a pragma to this namespace.

Declared at: clang/include/clang/Lex/Pragma.h:112

Parameters

clang::PragmaHandler* Handler

clang::PragmaHandler* FindHandler(
    llvm::StringRef Name,
    bool IgnoreNull = true) const

Description

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.

Declared at: clang/include/clang/Lex/Pragma.h:108

Parameters

llvm::StringRef Name
bool IgnoreNull = true

void HandlePragma(
    clang::Preprocessor& PP,
    clang::PragmaIntroducer Introducer,
    clang::Token& Tok)

Declared at: clang/include/clang/Lex/Pragma.h:120

Parameters

clang::Preprocessor& PP
clang::PragmaIntroducer Introducer
clang::Token& Tok

bool IsEmpty() const

Declared at: clang/include/clang/Lex/Pragma.h:118

PragmaNamespace(llvm::StringRef Name)

Declared at: clang/include/clang/Lex/Pragma.h:102

Parameters

llvm::StringRef Name

void RemovePragmaHandler(
    clang::PragmaHandler* Handler)

Description

RemovePragmaHandler - Remove the given handler from the namespace.

Declared at: clang/include/clang/Lex/Pragma.h:116

Parameters

clang::PragmaHandler* Handler

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:123