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;
40 for (llvm::FoldingSet<CGFunctionInfo>::iterator
41 I = FunctionInfos.begin(), E = FunctionInfos.end(); I != E; )
74 if (TDD->getDeclContext())
75 TDD->printQualifiedName(
OS, Policy);
84 Ty->setName(
OS.str());
103 auto *FixedVT = cast<llvm::FixedVectorType>(R);
105 uint64_t BytePadded = std::max<uint64_t>(FixedVT->getNumElements(), 8);
106 return llvm::IntegerType::get(FixedVT->getContext(), BytePadded);
123 llvm::DenseMap<const Type*, llvm::StructType *>::const_iterator I =
124 RecordDeclTypes.find(Ty);
125 return I != RecordDeclTypes.end() && !I->second->isOpaque();
141 if (!AlreadyChecked.insert(RD).second)
157 if (
const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
158 for (
const auto &I : CRD->bases())
166 for (
const auto *I : RD->
fields())
182 T = AT->getValueType();
223 if (!TT)
return true;
230 const RecordType *RT = dyn_cast<RecordType>(TT);
231 if (!RT)
return true;
254 for (
unsigned i = 0, e = FPT->getNumParams(); i != e; i++)
267 if (
const EnumDecl *ED = dyn_cast<EnumDecl>(TD)) {
269 if (TypeCache.count(ED->getTypeForDecl())) {
273 if (!
ConvertType(ED->getIntegerType())->isIntegerTy(32))
279 DI->completeType(ED);
296 DI->completeType(RD);
304 if (RecordsWithOpaqueMemberPointers.count(Ty)) {
306 RecordsWithOpaqueMemberPointers.clear();
311 const llvm::fltSemantics &format,
312 bool UseNativeHalf =
false) {
313 if (&format == &llvm::APFloat::IEEEhalf()) {
315 return llvm::Type::getHalfTy(VMContext);
317 return llvm::Type::getInt16Ty(VMContext);
319 if (&format == &llvm::APFloat::BFloat())
320 return llvm::Type::getBFloatTy(VMContext);
321 if (&format == &llvm::APFloat::IEEEsingle())
322 return llvm::Type::getFloatTy(VMContext);
323 if (&format == &llvm::APFloat::IEEEdouble())
324 return llvm::Type::getDoubleTy(VMContext);
325 if (&format == &llvm::APFloat::IEEEquad())
326 return llvm::Type::getFP128Ty(VMContext);
327 if (&format == &llvm::APFloat::PPCDoubleDouble())
328 return llvm::Type::getPPC_FP128Ty(VMContext);
329 if (&format == &llvm::APFloat::x87DoubleExtended())
330 return llvm::Type::getX86_FP80Ty(VMContext);
331 llvm_unreachable(
"Unknown float format!");
334llvm::Type *CodeGenTypes::ConvertFunctionTypeInternal(
QualType QFT) {
349 for (
unsigned i = 0, e = FPT->getNumParams(); i != e; i++)
353 SkippedLayout =
true;
362 if (!RecordsBeingLaidOut.insert(Ty).second) {
363 SkippedLayout =
true;
379 llvm::Type *ResultType =
nullptr;
382 if (FunctionsBeingProcessed.count(FI)) {
385 SkippedLayout =
true;
392 RecordsBeingLaidOut.erase(Ty);
394 if (RecordsBeingLaidOut.empty())
395 while (!DeferredRecords.empty())
421 if (
const RecordType *RT = dyn_cast<RecordType>(Ty))
429 llvm::Type *CachedType =
nullptr;
430 bool ShouldUseCache =
433 if (ShouldUseCache) {
434 llvm::DenseMap<const Type *, llvm::Type *>::iterator TCI =
436 if (TCI != TypeCache.end())
437 CachedType = TCI->second;
440#ifndef EXPENSIVE_CHECKS
447 llvm::Type *ResultType =
nullptr;
450#define TYPE(Class, Base)
451#define ABSTRACT_TYPE(Class, Base)
452#define NON_CANONICAL_TYPE(Class, Base) case Type::Class:
453#define DEPENDENT_TYPE(Class, Base) case Type::Class:
454#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
455#include "clang/AST/TypeNodes.inc"
456 llvm_unreachable(
"Non-canonical or dependent types aren't possible.");
458 case Type::Builtin: {
459 switch (cast<BuiltinType>(Ty)->
getKind()) {
460 case BuiltinType::Void:
461 case BuiltinType::ObjCId:
462 case BuiltinType::ObjCClass:
463 case BuiltinType::ObjCSel:
469 case BuiltinType::Bool:
474 case BuiltinType::Char_S:
475 case BuiltinType::Char_U:
476 case BuiltinType::SChar:
477 case BuiltinType::UChar:
478 case BuiltinType::Short:
479 case BuiltinType::UShort:
480 case BuiltinType::Int:
481 case BuiltinType::UInt:
482 case BuiltinType::Long:
483 case BuiltinType::ULong:
484 case BuiltinType::LongLong:
485 case BuiltinType::ULongLong:
486 case BuiltinType::WChar_S:
487 case BuiltinType::WChar_U:
488 case BuiltinType::Char8:
489 case BuiltinType::Char16:
490 case BuiltinType::Char32:
491 case BuiltinType::ShortAccum:
492 case BuiltinType::Accum:
493 case BuiltinType::LongAccum:
494 case BuiltinType::UShortAccum:
495 case BuiltinType::UAccum:
496 case BuiltinType::ULongAccum:
497 case BuiltinType::ShortFract:
498 case BuiltinType::Fract:
499 case BuiltinType::LongFract:
500 case BuiltinType::UShortFract:
501 case BuiltinType::UFract:
502 case BuiltinType::ULongFract:
503 case BuiltinType::SatShortAccum:
504 case BuiltinType::SatAccum:
505 case BuiltinType::SatLongAccum:
506 case BuiltinType::SatUShortAccum:
507 case BuiltinType::SatUAccum:
508 case BuiltinType::SatULongAccum:
509 case BuiltinType::SatShortFract:
510 case BuiltinType::SatFract:
511 case BuiltinType::SatLongFract:
512 case BuiltinType::SatUShortFract:
513 case BuiltinType::SatUFract:
514 case BuiltinType::SatULongFract:
519 case BuiltinType::Float16:
525 case BuiltinType::Half:
532 case BuiltinType::BFloat16:
533 case BuiltinType::Float:
534 case BuiltinType::Double:
535 case BuiltinType::LongDouble:
536 case BuiltinType::Float128:
537 case BuiltinType::Ibm128:
543 case BuiltinType::NullPtr:
548 case BuiltinType::UInt128:
549 case BuiltinType::Int128:
553#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
554 case BuiltinType::Id:
555#include "clang/Basic/OpenCLImageTypes.def"
556#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
557 case BuiltinType::Id:
558#include "clang/Basic/OpenCLExtensionTypes.def"
559 case BuiltinType::OCLSampler:
560 case BuiltinType::OCLEvent:
561 case BuiltinType::OCLClkEvent:
562 case BuiltinType::OCLQueue:
563 case BuiltinType::OCLReserveID:
566 case BuiltinType::SveInt8:
567 case BuiltinType::SveUint8:
568 case BuiltinType::SveInt8x2:
569 case BuiltinType::SveUint8x2:
570 case BuiltinType::SveInt8x3:
571 case BuiltinType::SveUint8x3:
572 case BuiltinType::SveInt8x4:
573 case BuiltinType::SveUint8x4:
574 case BuiltinType::SveInt16:
575 case BuiltinType::SveUint16:
576 case BuiltinType::SveInt16x2:
577 case BuiltinType::SveUint16x2:
578 case BuiltinType::SveInt16x3:
579 case BuiltinType::SveUint16x3:
580 case BuiltinType::SveInt16x4:
581 case BuiltinType::SveUint16x4:
582 case BuiltinType::SveInt32:
583 case BuiltinType::SveUint32:
584 case BuiltinType::SveInt32x2:
585 case BuiltinType::SveUint32x2:
586 case BuiltinType::SveInt32x3:
587 case BuiltinType::SveUint32x3:
588 case BuiltinType::SveInt32x4:
589 case BuiltinType::SveUint32x4:
590 case BuiltinType::SveInt64:
591 case BuiltinType::SveUint64:
592 case BuiltinType::SveInt64x2:
593 case BuiltinType::SveUint64x2:
594 case BuiltinType::SveInt64x3:
595 case BuiltinType::SveUint64x3:
596 case BuiltinType::SveInt64x4:
597 case BuiltinType::SveUint64x4:
598 case BuiltinType::SveBool:
599 case BuiltinType::SveBoolx2:
600 case BuiltinType::SveBoolx4:
601 case BuiltinType::SveFloat16:
602 case BuiltinType::SveFloat16x2:
603 case BuiltinType::SveFloat16x3:
604 case BuiltinType::SveFloat16x4:
605 case BuiltinType::SveFloat32:
606 case BuiltinType::SveFloat32x2:
607 case BuiltinType::SveFloat32x3:
608 case BuiltinType::SveFloat32x4:
609 case BuiltinType::SveFloat64:
610 case BuiltinType::SveFloat64x2:
611 case BuiltinType::SveFloat64x3:
612 case BuiltinType::SveFloat64x4:
613 case BuiltinType::SveBFloat16:
614 case BuiltinType::SveBFloat16x2:
615 case BuiltinType::SveBFloat16x3:
616 case BuiltinType::SveBFloat16x4: {
620 Info.
EC.getKnownMinValue() *
623 case BuiltinType::SveCount:
624 return llvm::TargetExtType::get(
getLLVMContext(),
"aarch64.svcount");
625#define PPC_VECTOR_TYPE(Name, Id, Size) \
626 case BuiltinType::Id: \
628 llvm::FixedVectorType::get(ConvertType(Context.BoolTy), Size); \
630#include "clang/Basic/PPCTypes.def"
631#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
632#include "clang/Basic/RISCVVTypes.def"
637 Info.
EC.getKnownMinValue() *
640#define WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS) \
641 case BuiltinType::Id: { \
642 if (BuiltinType::Id == BuiltinType::WasmExternRef) \
643 ResultType = CGM.getTargetCodeGenInfo().getWasmExternrefReferenceType(); \
645 llvm_unreachable("Unexpected wasm reference builtin type!"); \
647#include "clang/Basic/WebAssemblyReferenceTypes.def"
648 case BuiltinType::Dependent:
649#define BUILTIN_TYPE(Id, SingletonId)
650#define PLACEHOLDER_TYPE(Id, SingletonId) \
651 case BuiltinType::Id:
652#include "clang/AST/BuiltinTypes.def"
653 llvm_unreachable(
"Unexpected placeholder builtin type!");
658 case Type::DeducedTemplateSpecialization:
659 llvm_unreachable(
"Unexpected undeduced type!");
660 case Type::Complex: {
661 llvm::Type *EltTy =
ConvertType(cast<ComplexType>(Ty)->getElementType());
662 ResultType = llvm::StructType::get(EltTy, EltTy);
665 case Type::LValueReference:
666 case Type::RValueReference: {
671 ResultType = llvm::PointerType::get(PointeeType, AS);
674 case Type::Pointer: {
678 if (PointeeType->isVoidTy())
681 ResultType = llvm::PointerType::get(PointeeType, AS);
685 case Type::VariableArray: {
688 "FIXME: We only handle trivial array types so far!");
694 case Type::IncompleteArray: {
697 "FIXME: We only handle trivial array types so far!");
701 if (!ResultType->isSized()) {
702 SkippedLayout =
true;
705 ResultType = llvm::ArrayType::get(ResultType, 0);
708 case Type::ConstantArray: {
714 if (!EltTy->isSized()) {
715 SkippedLayout =
true;
719 ResultType = llvm::ArrayType::get(EltTy, A->
getSize().getZExtValue());
722 case Type::ExtVector:
724 const auto *VT = cast<VectorType>(Ty);
726 llvm::Type *IRElemTy = VT->isExtVectorBoolType()
729 ResultType = llvm::FixedVectorType::get(IRElemTy, VT->getNumElements());
732 case Type::ConstantMatrix: {
739 case Type::FunctionNoProto:
740 case Type::FunctionProto:
741 ResultType = ConvertFunctionTypeInternal(T);
743 case Type::ObjCObject:
744 ResultType =
ConvertType(cast<ObjCObjectType>(Ty)->getBaseType());
747 case Type::ObjCInterface: {
751 llvm::Type *&T = InterfaceTypes[cast<ObjCInterfaceType>(Ty)];
758 case Type::ObjCObjectPointer: {
764 ResultType = T->getPointerTo();
769 const EnumDecl *ED = cast<EnumType>(Ty)->getDecl();
779 case Type::BlockPointer: {
791 ResultType = llvm::PointerType::get(PointeeType, AS);
795 case Type::MemberPointer: {
796 auto *MPTy = cast<MemberPointerType>(Ty);
797 if (!
getCXXABI().isMemberPointerConvertible(MPTy)) {
798 auto *
C = MPTy->getClass();
799 auto Insertion = RecordsWithOpaqueMemberPointers.insert({
C,
nullptr});
800 if (Insertion.second)
801 Insertion.first->second = llvm::StructType::create(
getLLVMContext());
802 ResultType = Insertion.first->second;
810 QualType valueType = cast<AtomicType>(Ty)->getValueType();
814 uint64_t valueSize = Context.
getTypeSize(valueType);
816 if (valueSize != atomicSize) {
817 assert(valueSize < atomicSize);
818 llvm::Type *elts[] = {
820 llvm::ArrayType::get(CGM.
Int8Ty, (atomicSize - valueSize) / 8)
832 const auto &EIT = cast<BitIntType>(Ty);
833 ResultType = llvm::Type::getIntNTy(
getLLVMContext(), EIT->getNumBits());
838 assert(ResultType &&
"Didn't convert a type?");
839 assert((!CachedType || CachedType == ResultType) &&
840 "Cached type doesn't match computed type");
843 TypeCache[Ty] = ResultType;
861 llvm::StructType *&Entry = RecordDeclTypes[Key];
868 llvm::StructType *Ty = Entry;
878 DeferredRecords.push_back(RD);
883 bool InsertResult = RecordsBeingLaidOut.insert(Key).second;
885 assert(InsertResult &&
"Recursively compiling a struct?");
888 if (
const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
889 for (
const auto &I : CRD->bases()) {
890 if (I.isVirtual())
continue;
897 CGRecordLayouts[Key] = std::move(Layout);
900 bool EraseResult = RecordsBeingLaidOut.erase(Key); (void)EraseResult;
901 assert(EraseResult &&
"struct not in RecordsBeingLaidOut set?");
911 if (RecordsBeingLaidOut.empty())
912 while (!DeferredRecords.empty())
923 auto I = CGRecordLayouts.find(Key);
924 if (I != CGRecordLayouts.end())
930 I = CGRecordLayouts.find(Key);
932 assert(I != CGRecordLayouts.end() &&
933 "Unable to find record layout information for type");
947 if (isa<IncompleteArrayType>(AT))
949 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 bool isSafeToConvert(QualType T, CodeGenTypes &CGT, llvm::SmallPtrSet< const RecordDecl *, 16 > &AlreadyChecked)
isSafeToConvert - Return true if it is safe to convert this field type, which requires the structure ...
static Decl::Kind getKind(const Decl *D)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
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.
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.
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)
const LangOptions & getLangOpts() const
CGOpenCLRuntime & getOpenCLRuntime()
Return a reference to the configured OpenCL runtime.
const TargetCodeGenInfo & getTargetCodeGenInfo()
const CodeGenOptions & getCodeGenOpts() const
llvm::Type * getGenericBlockLiteralType()
The type of a generic block literal.
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
CodeGenTypes(CodeGenModule &cgm)
bool noRecordsBeingLaidOut() const
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.
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.
void UpdateCompletedType(const TagDecl *TD)
UpdateCompletedType - When we find the full definition for a TagDecl, replace the 'opaque' type we pr...
llvm::LLVMContext & getLLVMContext()
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...
llvm::Type * ConvertTypeForMem(QualType T, bool ForBitField=false)
ConvertTypeForMem - Convert type T into a llvm::Type.
bool isRecordBeingLaidOut(const Type *Ty) const
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.
const llvm::APInt & getSize() const
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.
bool hasAddressSpace() const
Check if this type has any address space qualifier.
Represents a struct/union/class.
field_range fields() const
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 isBuiltinType() const
Helper methods to distinguish type categories.
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.
@ C
Languages that the frontend can parse and compile.
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
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...