clang 20.0.0git
|
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 |
OpenCL supported extensions and optional core features.
Definition at line 69 of file OpenCLOptions.h.
using clang::OpenCLOptions::OpenCLOptionInfoMap = llvm::StringMap<OpenCLOptionInfo> |
Definition at line 187 of file OpenCLOptions.h.
clang::OpenCLOptions::OpenCLOptions | ( | ) |
Definition at line 102 of file OpenCLOptions.cpp.
Definition at line 92 of file OpenCLOptions.cpp.
References V.
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().
|
inline |
Definition at line 81 of file OpenCLOptions.h.
References clang::LangOptions::getOpenCLCompatibleVersion(), and isSupported().
|
static |
Definition at line 139 of file OpenCLOptions.cpp.
References clang::FeatureExtensionMap, clang::TargetInfo::getSupportedOpenCLOpts(), clang::TargetInfo::hasFeatureEnabled(), and clang::DiagnosticsEngine::Report().
Referenced by clang::TargetInfo::validateOpenCLTarget().
|
static |
Definition at line 122 of file OpenCLOptions.cpp.
References clang::DependentFeaturesList, clang::TargetInfo::getSupportedOpenCLOpts(), clang::TargetInfo::hasFeatureEnabled(), and clang::DiagnosticsEngine::Report().
Referenced by clang::TargetInfo::validateOpenCLTarget().
void clang::OpenCLOptions::disableAll | ( | ) |
Definition at line 117 of file OpenCLOptions.cpp.
Definition at line 88 of file OpenCLOptions.cpp.
References V.
bool clang::OpenCLOptions::isAvailableOption | ( | llvm::StringRef | Ext, |
const LangOptions & | LO | ||
) | const |
Definition at line 32 of file OpenCLOptions.cpp.
References isKnown(), and isSupported().
Referenced by ConvertDeclSpecToType(), clang::Sema::DefaultArgumentPromotion(), diagnoseOpenCLTypes(), GetFullTypeForDeclarator(), getOpenCLKernelParameterType(), clang::InitializationSequence::Perform(), clang::DeclSpec::SetStorageClassSpec(), and TryOCLZeroOpaqueTypeInitialization().
bool clang::OpenCLOptions::isKnown | ( | llvm::StringRef | Ext | ) | const |
Definition at line 28 of file OpenCLOptions.cpp.
Referenced by addSupport(), and isAvailableOption().
|
inlinestatic |
Definition at line 195 of file OpenCLOptions.h.
References clang::OpenCLOptions::OpenCLOptionInfo::isAvailableIn().
Referenced by InitializeOpenCLFeatureTestMacros().
|
inlinestatic |
Definition at line 190 of file OpenCLOptions.h.
References clang::OpenCLOptions::OpenCLOptionInfo::isCoreIn().
Referenced by clang::TargetInfo::validateOpenCLTarget().
bool clang::OpenCLOptions::isSupported | ( | llvm::StringRef | Ext, |
const LangOptions & | LO | ||
) | const |
Definition at line 54 of file OpenCLOptions.cpp.
Referenced by areProgramScopeVariablesSupported(), clang::SemaOpenCL::checkSubgroupExt(), ConvertDeclSpecToType(), clang::SemaOpenCL::handleAccessAttr(), and isAvailableOption().
bool clang::OpenCLOptions::isSupportedCore | ( | llvm::StringRef | Ext, |
const LangOptions & | LO | ||
) | const |
Definition at line 61 of file OpenCLOptions.cpp.
Referenced by 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().
bool clang::OpenCLOptions::isSupportedExtension | ( | llvm::StringRef | Ext, |
const LangOptions & | LO | ||
) | const |
Definition at line 80 of file OpenCLOptions.cpp.
References isSupportedCoreOrOptionalCore().
bool clang::OpenCLOptions::isSupportedOptionalCore | ( | llvm::StringRef | Ext, |
const LangOptions & | LO | ||
) | const |
Definition at line 68 of file OpenCLOptions.cpp.
Referenced by isSupportedCoreOrOptionalCore().
bool clang::OpenCLOptions::isWithPragma | ( | llvm::StringRef | Ext | ) | const |
Definition at line 49 of file OpenCLOptions.cpp.
References E.
Enable or disable support for OpenCL extensions.
Ext | name of the extension (not prefixed with '+' or '-') |
V | value to set for a extension |
Definition at line 96 of file OpenCLOptions.cpp.
References V.
Referenced by addSupport().
|
friend |
Definition at line 185 of file OpenCLOptions.h.
|
friend |
Definition at line 184 of file OpenCLOptions.h.