10 #include "TargetInfo.h"
12 using namespace clang;
29 uint64_t Bits = getContext().getTypeSize(Ty);
38 llvm::IntegerType::get(getVMContext(), llvm::alignTo(Bits, 8));
40 llvm::Type *RegTy = llvm::IntegerType::get(getVMContext(), 64);
41 CoerceTy = llvm::ArrayType::get(RegTy, 2);
45 return getNaturalAlignIndirect(Ty);
50 Ty = EnumTy->getDecl()->getIntegerType();
55 return getNaturalAlignIndirect(Ty);
66 return getNaturalAlignIndirect(RetTy);
70 RetTy = EnumTy->getDecl()->getIntegerType();
75 return getNaturalAlignIndirect(RetTy);
97 std::unique_ptr<TargetCodeGenInfo>
99 return std::make_unique<BPFTargetCodeGenInfo>(CGM.
getTypes());
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
A fixed int type of a specified bitwidth.
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
static ABIArgInfo getIgnore()
static ABIArgInfo getDirect(llvm::Type *T=nullptr, unsigned Offset=0, llvm::Type *Padding=nullptr, bool CanBeFlattened=true, unsigned Align=0)
static ABIArgInfo getExtend(QualType Ty, llvm::Type *T=nullptr)
CGFunctionInfo - Class to encapsulate the information about a function definition.
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
ABIArgInfo & getReturnInfo()
This class organizes the cross-function state that is used while generating LLVM code.
CodeGenTypes & getTypes()
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
DefaultABIInfo - The default implementation for ABI specific details.
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
A (possibly-)qualified type.
const T * getAs() const
Member-template getAs<specific type>'.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
std::unique_ptr< TargetCodeGenInfo > createBPFTargetCodeGenInfo(CodeGenModule &CGM)
bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
bool isAggregateTypeForABI(QualType T)
QualType useFirstFieldIfTransparentUnion(QualType Ty)
Pass transparent unions as if they were the type of the first element.
The JSON file list parser is used to communicate input to InstallAPI.