clang 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::OpenCLOptions Class Reference

OpenCL supported extensions and optional core features. More...

#include "clang/Basic/OpenCLOptions.h"

Classes

struct  OpenCLOptionInfo
 

Public Types

using OpenCLOptionInfoMap = llvm::StringMap< OpenCLOptionInfo >
 

Public Member Functions

bool areProgramScopeVariablesSupported (const LangOptions &Opts) const
 
bool isKnown (llvm::StringRef Ext) const
 
bool isAvailableOption (llvm::StringRef Ext, const LangOptions &LO) const
 
bool isWithPragma (llvm::StringRef Ext) const
 
bool isSupported (llvm::StringRef Ext, const LangOptions &LO) const
 
bool isSupportedCore (llvm::StringRef Ext, const LangOptions &LO) const
 
bool isSupportedOptionalCore (llvm::StringRef Ext, const LangOptions &LO) const
 
bool isSupportedCoreOrOptionalCore (llvm::StringRef Ext, const LangOptions &LO) const
 
bool isSupportedExtension (llvm::StringRef Ext, const LangOptions &LO) const
 
void acceptsPragma (llvm::StringRef Ext, bool V=true)
 
void enable (llvm::StringRef Ext, bool V=true)
 
void support (llvm::StringRef Ext, bool V=true)
 Enable or disable support for OpenCL extensions.
 
 OpenCLOptions ()
 
void addSupport (const llvm::StringMap< bool > &FeaturesMap, const LangOptions &Opts)
 
void disableAll ()
 

Static Public Member Functions

template<typename... Args>
static bool isOpenCLOptionCoreIn (const LangOptions &LO, Args &&... args)
 
template<typename... Args>
static bool isOpenCLOptionAvailableIn (const LangOptions &LO, Args &&... args)
 
static bool diagnoseUnsupportedFeatureDependencies (const TargetInfo &TI, DiagnosticsEngine &Diags)
 
static bool diagnoseFeatureExtensionDifferences (const TargetInfo &TI, DiagnosticsEngine &Diags)
 

Friends

class ASTWriter
 
class ASTReader
 

Detailed Description

OpenCL supported extensions and optional core features.

Definition at line 69 of file OpenCLOptions.h.

Member Typedef Documentation

◆ OpenCLOptionInfoMap

Definition at line 187 of file OpenCLOptions.h.

Constructor & Destructor Documentation

◆ OpenCLOptions()

clang::OpenCLOptions::OpenCLOptions ( )

Definition at line 102 of file OpenCLOptions.cpp.

Member Function Documentation

◆ acceptsPragma()

void clang::OpenCLOptions::acceptsPragma ( llvm::StringRef  Ext,
bool  V = true 
)

Definition at line 92 of file OpenCLOptions.cpp.

References V.

◆ addSupport()

void clang::OpenCLOptions::addSupport ( const llvm::StringMap< bool > &  FeaturesMap,
const LangOptions Opts 
)

Definition at line 108 of file OpenCLOptions.cpp.

References isKnown(), and support().

Referenced by clang::Sema::Initialize().

◆ areProgramScopeVariablesSupported()

bool clang::OpenCLOptions::areProgramScopeVariablesSupported ( const LangOptions Opts) const
inline

◆ diagnoseFeatureExtensionDifferences()

bool clang::OpenCLOptions::diagnoseFeatureExtensionDifferences ( const TargetInfo TI,
DiagnosticsEngine Diags 
)
static

◆ diagnoseUnsupportedFeatureDependencies()

bool clang::OpenCLOptions::diagnoseUnsupportedFeatureDependencies ( const TargetInfo TI,
DiagnosticsEngine Diags 
)
static

◆ disableAll()

void clang::OpenCLOptions::disableAll ( )

Definition at line 117 of file OpenCLOptions.cpp.

◆ enable()

void clang::OpenCLOptions::enable ( llvm::StringRef  Ext,
bool  V = true 
)

Definition at line 88 of file OpenCLOptions.cpp.

References V.

◆ isAvailableOption()

bool clang::OpenCLOptions::isAvailableOption ( llvm::StringRef  Ext,
const LangOptions LO 
) const

◆ isKnown()

bool clang::OpenCLOptions::isKnown ( llvm::StringRef  Ext) const

Definition at line 28 of file OpenCLOptions.cpp.

Referenced by addSupport(), and isAvailableOption().

◆ isOpenCLOptionAvailableIn()

template<typename... Args>
static bool clang::OpenCLOptions::isOpenCLOptionAvailableIn ( const LangOptions LO,
Args &&...  args 
)
inlinestatic

◆ isOpenCLOptionCoreIn()

template<typename... Args>
static bool clang::OpenCLOptions::isOpenCLOptionCoreIn ( const LangOptions LO,
Args &&...  args 
)
inlinestatic

◆ isSupported()

bool clang::OpenCLOptions::isSupported ( llvm::StringRef  Ext,
const LangOptions LO 
) const

◆ isSupportedCore()

bool clang::OpenCLOptions::isSupportedCore ( llvm::StringRef  Ext,
const LangOptions LO 
) const

Definition at line 61 of file OpenCLOptions.cpp.

Referenced by isSupportedCoreOrOptionalCore().

◆ isSupportedCoreOrOptionalCore()

bool clang::OpenCLOptions::isSupportedCoreOrOptionalCore ( llvm::StringRef  Ext,
const LangOptions LO 
) const

Definition at line 75 of file OpenCLOptions.cpp.

References isSupportedCore(), and isSupportedOptionalCore().

Referenced by isSupportedExtension().

◆ isSupportedExtension()

bool clang::OpenCLOptions::isSupportedExtension ( llvm::StringRef  Ext,
const LangOptions LO 
) const

Definition at line 80 of file OpenCLOptions.cpp.

References isSupportedCoreOrOptionalCore().

◆ isSupportedOptionalCore()

bool clang::OpenCLOptions::isSupportedOptionalCore ( llvm::StringRef  Ext,
const LangOptions LO 
) const

Definition at line 68 of file OpenCLOptions.cpp.

Referenced by isSupportedCoreOrOptionalCore().

◆ isWithPragma()

bool clang::OpenCLOptions::isWithPragma ( llvm::StringRef  Ext) const

Definition at line 49 of file OpenCLOptions.cpp.

References E.

◆ support()

void clang::OpenCLOptions::support ( llvm::StringRef  Ext,
bool  V = true 
)

Enable or disable support for OpenCL extensions.

Parameters
Extname of the extension (not prefixed with '+' or '-')
Vvalue to set for a extension

Definition at line 96 of file OpenCLOptions.cpp.

References V.

Referenced by addSupport().

Friends And Related Function Documentation

◆ ASTReader

friend class ASTReader
friend

Definition at line 185 of file OpenCLOptions.h.

◆ ASTWriter

friend class ASTWriter
friend

Definition at line 184 of file OpenCLOptions.h.


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