Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/AST/Type.h
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2,269 Lines • ▼ Show 20 Lines | #include "clang/Basic/OpenCLExtensionTypes.def" | ||||
/// Check if the type is the CUDA device builtin surface type. | /// Check if the type is the CUDA device builtin surface type. | ||||
bool isCUDADeviceBuiltinSurfaceType() const; | bool isCUDADeviceBuiltinSurfaceType() const; | ||||
/// Check if the type is the CUDA device builtin texture type. | /// Check if the type is the CUDA device builtin texture type. | ||||
bool isCUDADeviceBuiltinTextureType() const; | bool isCUDADeviceBuiltinTextureType() const; | ||||
bool isRVVType() const; | bool isRVVType() const; | ||||
bool isRVVType(unsigned Bitwidth, bool IsFloat) const; | |||||
/// Return the implicit lifetime for this type, which must not be dependent. | /// Return the implicit lifetime for this type, which must not be dependent. | ||||
Qualifiers::ObjCLifetime getObjCARCImplicitLifetime() const; | Qualifiers::ObjCLifetime getObjCARCImplicitLifetime() const; | ||||
enum ScalarTypeKind { | enum ScalarTypeKind { | ||||
STK_CPointer, | STK_CPointer, | ||||
STK_BlockPointer, | STK_BlockPointer, | ||||
STK_ObjCObjectPointer, | STK_ObjCObjectPointer, | ||||
STK_MemberPointer, | STK_MemberPointer, | ||||
▲ Show 20 Lines • Show All 4,862 Lines • ▼ Show 20 Lines | |||||
inline bool Type::isRVVType() const { | inline bool Type::isRVVType() const { | ||||
#define RVV_TYPE(Name, Id, SingletonId) \ | #define RVV_TYPE(Name, Id, SingletonId) \ | ||||
isSpecificBuiltinType(BuiltinType::Id) || | isSpecificBuiltinType(BuiltinType::Id) || | ||||
return | return | ||||
#include "clang/Basic/RISCVVTypes.def" | #include "clang/Basic/RISCVVTypes.def" | ||||
false; // end of boolean or operation. | false; // end of boolean or operation. | ||||
} | } | ||||
inline bool Type::isRVVType(unsigned Bitwidth, bool IsFloat) const { | |||||
bool Ret = false; | |||||
#define RVV_TYPE(Name, Id, SingletonId) | |||||
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, \ | |||||
IsFP) \ | |||||
if (ElBits == Bitwidth && IsFloat == IsFP) \ | |||||
Ret |= isSpecificBuiltinType(BuiltinType::Id); | |||||
#include "clang/Basic/RISCVVTypes.def" | |||||
return Ret; | |||||
} | |||||
inline bool Type::isTemplateTypeParmType() const { | inline bool Type::isTemplateTypeParmType() const { | ||||
return isa<TemplateTypeParmType>(CanonicalType); | return isa<TemplateTypeParmType>(CanonicalType); | ||||
} | } | ||||
inline bool Type::isSpecificBuiltinType(unsigned K) const { | inline bool Type::isSpecificBuiltinType(unsigned K) const { | ||||
if (const BuiltinType *BT = getAs<BuiltinType>()) { | if (const BuiltinType *BT = getAs<BuiltinType>()) { | ||||
return BT->getKind() == static_cast<BuiltinType::Kind>(K); | return BT->getKind() == static_cast<BuiltinType::Kind>(K); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |