25#include "llvm/IR/DataLayout.h"
26#include "llvm/IR/DerivedTypes.h"
27#include "llvm/IR/Module.h"
30using namespace CodeGen;
33 : CGM(cgm), Context(cgm.getContext()), TheModule(cgm.getModule()),
34 Target(cgm.getTarget()), TheCXXABI(cgm.getCXXABI()),
35 TheABIInfo(cgm.getTargetCodeGenInfo().getABIInfo()) {
36 SkippedLayout =
false;
37 LongDoubleReferenced =
false;
41 for (llvm::FoldingSet<CGFunctionInfo>::iterator
42 I = FunctionInfos.begin(),
E = FunctionInfos.end(); I !=
E; )
54 llvm::raw_svector_ostream OS(
TypeName);
75 if (TDD->getDeclContext())
76 TDD->printQualifiedName(OS, Policy);
85 Ty->setName(OS.str());
111 auto *FixedVT = cast<llvm::FixedVectorType>(R);
113 uint64_t BytePadded = std::max<uint64_t>(FixedVT->getNumElements(), 8);
114 return llvm::IntegerType::get(FixedVT->getContext(), BytePadded);
132 return llvm::ArrayType::get(CGM.
Int8Ty,
138 if (R->isIntegerTy(1))
147 llvm::Type *LLVMTy) {
154 return ASTSize != LLVMSize;
158 llvm::Type *LLVMTy) {
163 return llvm::Type::getIntNTy(
166 if (LLVMTy->isIntegerTy(1))
179 llvm::DenseMap<const Type*, llvm::StructType *>::const_iterator I =
180 RecordDeclTypes.find(Ty);
181 return I != RecordDeclTypes.end() && !I->second->isOpaque();
195 if (!TT)
return true;
212 for (
unsigned i = 0, e = FPT->getNumParams(); i != e; i++)
225 if (
const EnumDecl *ED = dyn_cast<EnumDecl>(TD)) {
227 if (TypeCache.count(ED->getTypeForDecl())) {
231 if (!
ConvertType(ED->getIntegerType())->isIntegerTy(32))
237 DI->completeType(ED);
254 DI->completeType(RD);
261 const Type *Ty =
T.getTypePtr();
262 if (RecordsWithOpaqueMemberPointers.count(Ty)) {
264 RecordsWithOpaqueMemberPointers.clear();
269 const llvm::fltSemantics &format,
270 bool UseNativeHalf =
false) {
271 if (&format == &llvm::APFloat::IEEEhalf()) {
273 return llvm::Type::getHalfTy(VMContext);
275 return llvm::Type::getInt16Ty(VMContext);
277 if (&format == &llvm::APFloat::BFloat())
278 return llvm::Type::getBFloatTy(VMContext);
279 if (&format == &llvm::APFloat::IEEEsingle())
280 return llvm::Type::getFloatTy(VMContext);
281 if (&format == &llvm::APFloat::IEEEdouble())
282 return llvm::Type::getDoubleTy(VMContext);
283 if (&format == &llvm::APFloat::IEEEquad())
284 return llvm::Type::getFP128Ty(VMContext);
285 if (&format == &llvm::APFloat::PPCDoubleDouble())
286 return llvm::Type::getPPC_FP128Ty(VMContext);
287 if (&format == &llvm::APFloat::x87DoubleExtended())
288 return llvm::Type::getX86_FP80Ty(VMContext);
289 llvm_unreachable(
"Unknown float format!");
292llvm::Type *CodeGenTypes::ConvertFunctionTypeInternal(
QualType QFT) {
306 for (
unsigned i = 0, e = FPT->getNumParams(); i != e; i++)
310 SkippedLayout =
true;
328 llvm::Type *ResultType =
nullptr;
331 if (FunctionsBeingProcessed.count(FI)) {
334 SkippedLayout =
true;
348 const Type *Ty =
T.getTypePtr();
365 if (
const RecordType *RT = dyn_cast<RecordType>(Ty))
368 llvm::Type *CachedType =
nullptr;
369 auto TCI = TypeCache.find(Ty);
370 if (TCI != TypeCache.end())
371 CachedType = TCI->second;
374#ifndef EXPENSIVE_CHECKS
380 llvm::Type *ResultType =
nullptr;
383#define TYPE(Class, Base)
384#define ABSTRACT_TYPE(Class, Base)
385#define NON_CANONICAL_TYPE(Class, Base) case Type::Class:
386#define DEPENDENT_TYPE(Class, Base) case Type::Class:
387#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
388#include "clang/AST/TypeNodes.inc"
389 llvm_unreachable(
"Non-canonical or dependent types aren't possible.");
391 case Type::Builtin: {
392 switch (cast<BuiltinType>(Ty)->
getKind()) {
393 case BuiltinType::Void:
394 case BuiltinType::ObjCId:
395 case BuiltinType::ObjCClass:
396 case BuiltinType::ObjCSel:
402 case BuiltinType::Bool:
407 case BuiltinType::Char_S:
408 case BuiltinType::Char_U:
409 case BuiltinType::SChar:
410 case BuiltinType::UChar:
411 case BuiltinType::Short:
412 case BuiltinType::UShort:
413 case BuiltinType::Int:
414 case BuiltinType::UInt:
415 case BuiltinType::Long:
416 case BuiltinType::ULong:
417 case BuiltinType::LongLong:
418 case BuiltinType::ULongLong:
419 case BuiltinType::WChar_S:
420 case BuiltinType::WChar_U:
421 case BuiltinType::Char8:
422 case BuiltinType::Char16:
423 case BuiltinType::Char32:
424 case BuiltinType::ShortAccum:
425 case BuiltinType::Accum:
426 case BuiltinType::LongAccum:
427 case BuiltinType::UShortAccum:
428 case BuiltinType::UAccum:
429 case BuiltinType::ULongAccum:
430 case BuiltinType::ShortFract:
431 case BuiltinType::Fract:
432 case BuiltinType::LongFract:
433 case BuiltinType::UShortFract:
434 case BuiltinType::UFract:
435 case BuiltinType::ULongFract:
436 case BuiltinType::SatShortAccum:
437 case BuiltinType::SatAccum:
438 case BuiltinType::SatLongAccum:
439 case BuiltinType::SatUShortAccum:
440 case BuiltinType::SatUAccum:
441 case BuiltinType::SatULongAccum:
442 case BuiltinType::SatShortFract:
443 case BuiltinType::SatFract:
444 case BuiltinType::SatLongFract:
445 case BuiltinType::SatUShortFract:
446 case BuiltinType::SatUFract:
447 case BuiltinType::SatULongFract:
452 case BuiltinType::Float16:
458 case BuiltinType::Half:
465 case BuiltinType::LongDouble:
466 LongDoubleReferenced =
true;
468 case BuiltinType::BFloat16:
469 case BuiltinType::Float:
470 case BuiltinType::Double:
471 case BuiltinType::Float128:
472 case BuiltinType::Ibm128:
478 case BuiltinType::NullPtr:
483 case BuiltinType::UInt128:
484 case BuiltinType::Int128:
488#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
489 case BuiltinType::Id:
490#include "clang/Basic/OpenCLImageTypes.def"
491#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
492 case BuiltinType::Id:
493#include "clang/Basic/OpenCLExtensionTypes.def"
494 case BuiltinType::OCLSampler:
495 case BuiltinType::OCLEvent:
496 case BuiltinType::OCLClkEvent:
497 case BuiltinType::OCLQueue:
498 case BuiltinType::OCLReserveID:
501 case BuiltinType::SveInt8:
502 case BuiltinType::SveUint8:
503 case BuiltinType::SveInt8x2:
504 case BuiltinType::SveUint8x2:
505 case BuiltinType::SveInt8x3:
506 case BuiltinType::SveUint8x3:
507 case BuiltinType::SveInt8x4:
508 case BuiltinType::SveUint8x4:
509 case BuiltinType::SveInt16:
510 case BuiltinType::SveUint16:
511 case BuiltinType::SveInt16x2:
512 case BuiltinType::SveUint16x2:
513 case BuiltinType::SveInt16x3:
514 case BuiltinType::SveUint16x3:
515 case BuiltinType::SveInt16x4:
516 case BuiltinType::SveUint16x4:
517 case BuiltinType::SveInt32:
518 case BuiltinType::SveUint32:
519 case BuiltinType::SveInt32x2:
520 case BuiltinType::SveUint32x2:
521 case BuiltinType::SveInt32x3:
522 case BuiltinType::SveUint32x3:
523 case BuiltinType::SveInt32x4:
524 case BuiltinType::SveUint32x4:
525 case BuiltinType::SveInt64:
526 case BuiltinType::SveUint64:
527 case BuiltinType::SveInt64x2:
528 case BuiltinType::SveUint64x2:
529 case BuiltinType::SveInt64x3:
530 case BuiltinType::SveUint64x3:
531 case BuiltinType::SveInt64x4:
532 case BuiltinType::SveUint64x4:
533 case BuiltinType::SveBool:
534 case BuiltinType::SveBoolx2:
535 case BuiltinType::SveBoolx4:
536 case BuiltinType::SveFloat16:
537 case BuiltinType::SveFloat16x2:
538 case BuiltinType::SveFloat16x3:
539 case BuiltinType::SveFloat16x4:
540 case BuiltinType::SveFloat32:
541 case BuiltinType::SveFloat32x2:
542 case BuiltinType::SveFloat32x3:
543 case BuiltinType::SveFloat32x4:
544 case BuiltinType::SveFloat64:
545 case BuiltinType::SveFloat64x2:
546 case BuiltinType::SveFloat64x3:
547 case BuiltinType::SveFloat64x4:
548 case BuiltinType::SveBFloat16:
549 case BuiltinType::SveBFloat16x2:
550 case BuiltinType::SveBFloat16x3:
551 case BuiltinType::SveBFloat16x4: {
555 Info.
EC.getKnownMinValue() *
558 case BuiltinType::SveCount:
559 return llvm::TargetExtType::get(
getLLVMContext(),
"aarch64.svcount");
560#define PPC_VECTOR_TYPE(Name, Id, Size) \
561 case BuiltinType::Id: \
563 llvm::FixedVectorType::get(ConvertType(Context.BoolTy), Size); \
565#include "clang/Basic/PPCTypes.def"
566#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
567#include "clang/Basic/RISCVVTypes.def"
575 llvm::Type *EltTy = llvm::ScalableVectorType::get(
581 Info.
EC.getKnownMinValue());
583#define WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS) \
584 case BuiltinType::Id: { \
585 if (BuiltinType::Id == BuiltinType::WasmExternRef) \
586 ResultType = CGM.getTargetCodeGenInfo().getWasmExternrefReferenceType(); \
588 llvm_unreachable("Unexpected wasm reference builtin type!"); \
590#include "clang/Basic/WebAssemblyReferenceTypes.def"
591#define AMDGPU_OPAQUE_PTR_TYPE(Name, MangledName, AS, Width, Align, Id, \
593 case BuiltinType::Id: \
594 return llvm::PointerType::get(getLLVMContext(), AS);
595#include "clang/Basic/AMDGPUTypes.def"
596 case BuiltinType::Dependent:
597#define BUILTIN_TYPE(Id, SingletonId)
598#define PLACEHOLDER_TYPE(Id, SingletonId) \
599 case BuiltinType::Id:
600#include "clang/AST/BuiltinTypes.def"
601 llvm_unreachable(
"Unexpected placeholder builtin type!");
606 case Type::DeducedTemplateSpecialization:
607 llvm_unreachable(
"Unexpected undeduced type!");
608 case Type::Complex: {
609 llvm::Type *EltTy =
ConvertType(cast<ComplexType>(Ty)->getElementType());
610 ResultType = llvm::StructType::get(EltTy, EltTy);
613 case Type::LValueReference:
614 case Type::RValueReference: {
621 case Type::Pointer: {
629 case Type::VariableArray: {
632 "FIXME: We only handle trivial array types so far!");
638 case Type::IncompleteArray: {
641 "FIXME: We only handle trivial array types so far!");
645 if (!ResultType->isSized()) {
646 SkippedLayout =
true;
649 ResultType = llvm::ArrayType::get(ResultType, 0);
652 case Type::ArrayParameter:
653 case Type::ConstantArray: {
659 if (!EltTy->isSized()) {
660 SkippedLayout =
true;
664 ResultType = llvm::ArrayType::get(EltTy, A->
getZExtSize());
667 case Type::ExtVector:
669 const auto *VT = cast<VectorType>(Ty);
671 llvm::Type *IRElemTy = VT->isExtVectorBoolType()
674 ResultType = llvm::FixedVectorType::get(IRElemTy, VT->getNumElements());
677 case Type::ConstantMatrix: {
684 case Type::FunctionNoProto:
685 case Type::FunctionProto:
686 ResultType = ConvertFunctionTypeInternal(
T);
688 case Type::ObjCObject:
689 ResultType =
ConvertType(cast<ObjCObjectType>(Ty)->getBaseType());
692 case Type::ObjCInterface: {
696 llvm::Type *&
T = InterfaceTypes[cast<ObjCInterfaceType>(Ty)];
703 case Type::ObjCObjectPointer:
708 const EnumDecl *ED = cast<EnumType>(Ty)->getDecl();
718 case Type::BlockPointer: {
731 case Type::MemberPointer: {
732 auto *MPTy = cast<MemberPointerType>(Ty);
733 if (!
getCXXABI().isMemberPointerConvertible(MPTy)) {
734 auto *
C = MPTy->getClass();
735 auto Insertion = RecordsWithOpaqueMemberPointers.insert({
C,
nullptr});
736 if (Insertion.second)
737 Insertion.first->second = llvm::StructType::create(
getLLVMContext());
738 ResultType = Insertion.first->second;
746 QualType valueType = cast<AtomicType>(Ty)->getValueType();
750 uint64_t valueSize = Context.
getTypeSize(valueType);
752 if (valueSize != atomicSize) {
753 assert(valueSize < atomicSize);
754 llvm::Type *elts[] = {
756 llvm::ArrayType::get(CGM.
Int8Ty, (atomicSize - valueSize) / 8)
768 const auto &EIT = cast<BitIntType>(Ty);
769 ResultType = llvm::Type::getIntNTy(
getLLVMContext(), EIT->getNumBits());
774 assert(ResultType &&
"Didn't convert a type?");
775 assert((!CachedType || CachedType == ResultType) &&
776 "Cached type doesn't match computed type");
778 TypeCache[Ty] = ResultType;
796 llvm::StructType *&Entry = RecordDeclTypes[Key];
803 llvm::StructType *Ty = Entry;
812 if (
const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
813 for (
const auto &I : CRD->bases()) {
814 if (I.isVirtual())
continue;
821 CGRecordLayouts[Key] = std::move(Layout);
837 auto I = CGRecordLayouts.find(Key);
838 if (I != CGRecordLayouts.end())
844 I = CGRecordLayouts.find(Key);
846 assert(I != CGRecordLayouts.end() &&
847 "Unable to find record layout information for type");
861 if (isa<IncompleteArrayType>(AT))
863 if (
const auto *CAT = dyn_cast<ConstantArrayType>(AT))
Defines the clang::ASTContext interface.
static llvm::Type * getTypeForFormat(llvm::LLVMContext &VMContext, const llvm::fltSemantics &format, bool UseNativeHalf=false)
static Decl::Kind getKind(const Decl *D)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
llvm::MachO::Target Target
static CharUnits getTypeAllocSize(CodeGenModule &CGM, llvm::Type *type)
BuiltinVectorTypeInfo getBuiltinVectorTypeInfo(const BuiltinType *VecTy) const
Returns the element type, element count and number of vectors (in case of tuple) for a builtin vector...
const llvm::fltSemantics & getFloatTypeSemantics(QualType T) const
Return the APFloat 'semantics' for the specified scalar floating point type.
QualType getTagDeclType(const TagDecl *Decl) const
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
QualType getRecordType(const RecordDecl *Decl) const
uint64_t getTargetNullPointerValue(QualType QT) const
Get target-dependent integer value for null pointer which is used for constant folding.
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
const LangOptions & getLangOpts() const
QualType getBaseElementType(const ArrayType *VAT) const
Return the innermost element type of an array type.
const clang::PrintingPolicy & getPrintingPolicy() const
const ArrayType * getAsArrayType(QualType T) const
Type Query functions.
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
CharUnits getTypeSizeInChars(QualType T) const
Return the size of the specified (complete) type T, in characters.
const TargetInfo & getTargetInfo() const
uint64_t getConstantArrayElementCount(const ConstantArrayType *CA) const
Return number of constant array elements.
unsigned getTargetAddressSpace(LangAS AS) const
QualType getElementType() const
unsigned getIndexTypeCVRQualifiers() const
Represents a C++ struct/union/class.
Represents a canonical, potentially-qualified type.
const T * getTypePtr() const
Retrieve the underlying type pointer, which refers to a canonical type.
CharUnits - This is an opaque type for sizes expressed in character units.
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
static CharUnits fromQuantity(QuantityType Quantity)
fromQuantity - Construct a CharUnits quantity from a raw integer type.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
virtual bool isMemberPointerConvertible(const MemberPointerType *MPT) const
Return whether or not a member pointers type is convertible to an IR type.
virtual llvm::Type * ConvertMemberPointerType(const MemberPointerType *MPT)
Find the LLVM type used to represent the given member pointer type.
virtual bool isZeroInitializable(const MemberPointerType *MPT)
Return true if the given member pointer can be zero-initialized (in the C++ sense) with an LLVM zeroi...
This class gathers all debug information during compilation and is responsible for emitting to llvm g...
CGFunctionInfo - Class to encapsulate the information about a function definition.
virtual llvm::Type * getPipeType(const PipeType *T, StringRef Name, llvm::Type *&PipeTy)
virtual llvm::Type * convertOpenCLSpecificType(const Type *T)
CGRecordLayout - This class handles struct and union layout info while lowering AST types to LLVM typ...
bool isZeroInitializable() const
Check whether this struct can be C++ zero-initialized with a zeroinitializer.
This class organizes the cross-function state that is used while generating LLVM code.
CGDebugInfo * getModuleDebugInfo()
bool isPaddedAtomicType(QualType type)
CGOpenCLRuntime & getOpenCLRuntime()
Return a reference to the configured OpenCL runtime.
const TargetCodeGenInfo & getTargetCodeGenInfo()
const CodeGenOptions & getCodeGenOpts() const
CodeGenTypes(CodeGenModule &cgm)
llvm::Type * ConvertType(QualType T)
ConvertType - Convert type T into a llvm::Type.
bool isPointerZeroInitializable(QualType T)
Check if the pointer type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.
const CodeGenOptions & getCodeGenOpts() const
ASTContext & getContext() const
const CGFunctionInfo & arrangeFreeFunctionType(CanQual< FunctionProtoType > Ty)
Arrange the argument and result information for a value of the given freestanding function type.
llvm::FunctionType * GetFunctionType(const CGFunctionInfo &Info)
GetFunctionType - Get the LLVM function type for.
bool isFuncTypeConvertible(const FunctionType *FT)
isFuncTypeConvertible - Utility to check whether a function type can be converted to an LLVM type (i....
std::unique_ptr< CGRecordLayout > ComputeRecordLayout(const RecordDecl *D, llvm::StructType *Ty)
Compute a new LLVM record layout object for the given record.
llvm::Type * convertTypeForLoadStore(QualType T, llvm::Type *LLVMTy=nullptr)
Given that T is a scalar type, return the IR type that should be used for load and store operations.
const CGRecordLayout & getCGRecordLayout(const RecordDecl *)
getCGRecordLayout - Return record layout info for the given record decl.
unsigned getTargetAddressSpace(QualType T) const
llvm::StructType * ConvertRecordDeclType(const RecordDecl *TD)
ConvertRecordDeclType - Lay out a tagged decl type like struct or union.
void RefreshTypeCacheForClass(const CXXRecordDecl *RD)
Remove stale types from the type cache when an inheritance model gets assigned to a class.
bool isRecordLayoutComplete(const Type *Ty) const
isRecordLayoutComplete - Return true if the specified type is already completely laid out.
llvm::Type * ConvertTypeForMem(QualType T)
ConvertTypeForMem - Convert type T into a llvm::Type.
void UpdateCompletedType(const TagDecl *TD)
UpdateCompletedType - When we find the full definition for a TagDecl, replace the 'opaque' type we pr...
llvm::LLVMContext & getLLVMContext()
bool typeRequiresSplitIntoByteArray(QualType ASTTy, llvm::Type *LLVMTy=nullptr)
Check whether the given type needs to be laid out in memory using an opaque byte-array type because i...
const llvm::DataLayout & getDataLayout() const
CGCXXABI & getCXXABI() const
bool isFuncParamTypeConvertible(QualType Ty)
isFuncParamTypeConvertible - Return true if the specified type in a function parameter or result posi...
bool isZeroInitializable(QualType T)
IsZeroInitializable - Return whether a type can be zero-initialized (in the C++ sense) with an LLVM z...
void addRecordTypeName(const RecordDecl *RD, llvm::StructType *Ty, StringRef suffix)
addRecordTypeName - Compute a name from the given record decl with an optional suffix and name the gi...
virtual llvm::Type * getCUDADeviceBuiltinSurfaceDeviceType() const
Return the device-side type for the CUDA device builtin surface type.
virtual llvm::Type * getCUDADeviceBuiltinTextureDeviceType() const
Return the device-side type for the CUDA device builtin texture type.
Represents the canonical version of C arrays with a specified constant size.
uint64_t getZExtSize() const
Return the size zero-extended as a uint64_t.
Represents a concrete matrix type with constant number of rows and columns.
unsigned getNumColumns() const
Returns the number of columns in the matrix.
unsigned getNumRows() const
Returns the number of rows in the matrix.
ASTContext & getASTContext() const LLVM_READONLY
DeclContext * getDeclContext()
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments.
Represents a prototype with parameter type info, e.g.
FunctionType - C99 6.7.5.3 - Function Declarators.
QualType getReturnType() const
Represents a C array with an unspecified size.
QualType getElementType() const
Returns type of the elements being stored in the matrix.
A pointer to member type per C++ 8.3.3 - Pointers to members.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
void printQualifiedName(raw_ostream &OS) const
Returns a human-readable qualified name for this declaration, like A::B::i, for i being member of nam...
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
A (possibly-)qualified type.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
LangAS getAddressSpace() const
Return the address space of this type.
Represents a struct/union/class.
RecordDecl * getDefinition() const
Returns the RecordDecl that actually defines this struct/union/class.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
RecordDecl * getDecl() const
Base for LValueReferenceType and RValueReferenceType.
QualType getPointeeType() const
Represents the declaration of a struct/union/class/enum.
StringRef getKindName() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
TypedefNameDecl * getTypedefNameForAnonDecl() const
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
bool isDependentType() const
Whether this declaration declares a type that is dependent, i.e., a type that somehow depends on temp...
virtual bool useFP16ConversionIntrinsics() const
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
The base class of the type hierarchy.
bool isBlockPointerType() const
bool isConstantMatrixType() const
bool isCUDADeviceBuiltinSurfaceType() const
Check if the type is the CUDA device builtin surface type.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
bool isExtVectorBoolType() const
bool isBitIntType() const
bool isCUDADeviceBuiltinTextureType() const
Check if the type is the CUDA device builtin texture type.
bool isIncompleteType(NamedDecl **Def=nullptr) const
Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types,...
bool isFunctionType() const
bool isAnyPointerType() const
TypeClass getTypeClass() const
const T * getAs() const
Member-template getAs<specific type>'.
Base class for declarations which introduce a typedef-name.
Represents a C array with a specified size that is not an integer-constant-expression.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
llvm::IntegerType * Int8Ty
i8, i16, i32, and i64
Describes how types, statements, expressions, and declarations should be printed.
unsigned SuppressInlineNamespace
Suppress printing parts of scope specifiers that correspond to inline namespaces, where the name is u...