10#include "TargetInfo.h"
21 SlotSize, SlotSize,
true);
29 2 * SlotSize - EltSize);
44 llvm::Value *
Address,
bool Is64Bit,
51 llvm::IntegerType *i8 = CGF.
Int8Ty;
52 llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
53 llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
54 llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
107class AIXABIInfo :
public ABIInfo {
109 const unsigned PtrByteSize;
114 :
ABIInfo(CGT), Is64Bit(Is64Bit), PtrByteSize(Is64Bit ? 8 : 4) {}
116 bool isPromotableTypeForABI(
QualType Ty)
const;
145 llvm::Value *
Address)
const override;
154bool AIXABIInfo::isPromotableTypeForABI(
QualType Ty)
const {
157 Ty = ED->getIntegerType();
160 if (getContext().isPromotableIntegerType(Ty))
170 switch (BT->getKind()) {
171 case BuiltinType::Int:
172 case BuiltinType::UInt:
192 return getNaturalAlignIndirect(RetTy, getDataLayout().getAllocaAddrSpace());
211 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
214 CharUnits CCAlign = getParamTypeAlignment(Ty);
215 CharUnits TyAlign = getContext().getTypeAlignInChars(Ty);
218 CCAlign, getDataLayout().getAllocaAddrSpace(),
223 return (isPromotableTypeForABI(Ty)
231 Ty = CTy->getElementType();
246 auto TypeInfo = getContext().getTypeInfoInChars(Ty);
260 if (EltSize < SlotSize)
265 SlotSize,
true, Slot);
268bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
273void AIXTargetCodeGenInfo::setTargetAttributes(
275 if (!isa<llvm::GlobalVariable>(GV))
278 auto *GVar = cast<llvm::GlobalVariable>(GV);
279 auto GVId = GV->getName();
282 bool UserSpecifiedTOC =
286 if (UserSpecifiedTOC ||
289 const unsigned long PointerSize =
290 GV->getParent()->getDataLayout().getPointerSizeInBits() / 8;
291 auto *VarD = dyn_cast<VarDecl>(
D);
292 assert(VarD &&
"Invalid declaration of global variable.");
296 const auto *Ty = VarD->getType().getTypePtr();
299 bool EmitDiagnostic = UserSpecifiedTOC && GV->hasExternalLinkage();
300 auto reportUnsupportedWarning = [&](
bool ShouldEmitWarning, StringRef Msg) {
301 if (ShouldEmitWarning)
306 reportUnsupportedWarning(EmitDiagnostic,
"of incomplete type");
308 reportUnsupportedWarning(EmitDiagnostic,
309 "it contains a flexible array member");
311 reportUnsupportedWarning(EmitDiagnostic,
"of thread local storage");
313 reportUnsupportedWarning(EmitDiagnostic,
314 "variable is larger than a pointer");
315 else if (PointerSize < Alignment)
316 reportUnsupportedWarning(EmitDiagnostic,
317 "variable is aligned wider than a pointer");
319 reportUnsupportedWarning(EmitDiagnostic,
320 "variable has a section attribute");
321 else if (GV->hasExternalLinkage() ||
323 GVar->addAttribute(
"toc-data");
332 bool IsRetSmallStructInRegABI;
338 bool RetSmallStructInRegABI)
340 IsRetSmallStructInRegABI(RetSmallStructInRegABI) {}
357 PPC32TargetCodeGenInfo(
CodeGenTypes &CGT,
bool SoftFloatABI,
358 bool RetSmallStructInRegABI)
360 CGT, SoftFloatABI, RetSmallStructInRegABI)) {}
362 static bool isStructReturnInRegABI(
const llvm::Triple &Triple,
371 llvm::Value *
Address)
const override;
378 Ty = CTy->getElementType();
386 const Type *AlignTy =
nullptr;
389 if ((EltType->isVectorType() && getContext().getTypeSize(EltType) == 128) ||
404 (Size = getContext().getTypeSize(RetTy)) <= 64) {
419 llvm::Type *CoerceTy = llvm::Type::getIntNTy(getVMContext(), Size);
431 if (getTarget().getTriple().isOSDarwin()) {
432 auto TI = getContext().getTypeInfoInChars(Ty);
433 TI.Align = getParamTypeAlignment(Ty);
441 const unsigned OverflowLimit = 8;
456 bool isI64 = Ty->
isIntegerType() && getContext().getTypeSize(Ty) == 64;
458 bool isF64 = Ty->
isFloatingType() && getContext().getTypeSize(Ty) == 64;
468 if (isInt || IsSoftFloatABI) {
469 NumRegsAddr = Builder.CreateStructGEP(VAList, 0,
"gpr");
471 NumRegsAddr = Builder.CreateStructGEP(VAList, 1,
"fpr");
474 llvm::Value *NumRegs = Builder.CreateLoad(NumRegsAddr,
"numUsedRegs");
477 if (isI64 || (isF64 && IsSoftFloatABI)) {
478 NumRegs = Builder.CreateAdd(NumRegs, Builder.getInt8(1));
479 NumRegs = Builder.CreateAnd(NumRegs, Builder.getInt8((uint8_t) ~1U));
483 Builder.CreateICmpULT(NumRegs, Builder.getInt8(OverflowLimit),
"cond");
489 Builder.CreateCondBr(CC, UsingRegs, UsingOverflow);
491 llvm::Type *DirectTy = CGF.
ConvertType(Ty), *ElementTy = DirectTy;
500 Address RegSaveAreaPtr = Builder.CreateStructGEP(VAList, 4);
501 RegAddr =
Address(Builder.CreateLoad(RegSaveAreaPtr), CGF.
Int8Ty,
506 if (!(isInt || IsSoftFloatABI)) {
507 RegAddr = Builder.CreateConstInBoundsByteGEP(RegAddr,
514 llvm::Value *RegOffset =
515 Builder.CreateMul(NumRegs, Builder.getInt8(RegSize.
getQuantity()));
516 RegAddr =
Address(Builder.CreateInBoundsGEP(
523 Builder.CreateAdd(NumRegs,
524 Builder.getInt8((isI64 || (isF64 && IsSoftFloatABI)) ? 2 : 1));
525 Builder.CreateStore(NumRegs, NumRegsAddr);
535 Builder.CreateStore(Builder.getInt8(OverflowLimit), NumRegsAddr);
548 Address OverflowAreaAddr = Builder.CreateStructGEP(VAList, 3);
550 Address(Builder.CreateLoad(OverflowAreaAddr,
"argp.cur"), CGF.
Int8Ty,
554 if (Align > OverflowAreaAlign) {
563 OverflowArea = Builder.CreateConstInBoundsByteGEP(OverflowArea, Size);
564 Builder.CreateStore(OverflowArea.
emitRawPointer(CGF), OverflowAreaAddr);
576 Result =
Address(Builder.CreateLoad(Result,
"aggr"), ElementTy,
577 getContext().getTypeAlignInChars(Ty));
583bool PPC32TargetCodeGenInfo::isStructReturnInRegABI(
585 assert(Triple.isPPC32());
587 switch (Opts.getStructReturnConvention()) {
596 if (Triple.isOSBinFormatELF() && !Triple.isOSLinux())
614class PPC64_SVR4_ABIInfo :
public ABIInfo {
615 static const unsigned GPRBits = 64;
624 bool isPromotableTypeForABI(
QualType Ty)
const;
632 uint64_t Members)
const override;
671 std::make_unique<PPC64_SVR4_ABIInfo>(CGT,
Kind, SoftFloatABI)) {
673 std::make_unique<SwiftABIInfo>(CGT,
false);
682 llvm::Value *
Address)
const override;
684 const llvm::MapVector<GlobalDecl, StringRef>
685 &MangledDeclNames)
const override;
699 llvm::Value *
Address)
const override;
706PPC64_SVR4_ABIInfo::isPromotableTypeForABI(
QualType Ty)
const {
709 Ty = ED->getIntegerType();
712 if (isPromotableIntegerTypeForABI(Ty))
719 case BuiltinType::Int:
720 case BuiltinType::UInt:
727 if (EIT->getNumBits() < 64)
738 Ty = CTy->getElementType();
740 auto FloatUsesVector = [
this](
QualType Ty){
742 Ty) == &llvm::APFloat::IEEEquad();
749 }
else if (FloatUsesVector(Ty)) {
758 const Type *AlignAsType =
nullptr;
762 if ((EltType->
isVectorType() && getContext().getTypeSize(EltType) == 128) ||
764 AlignAsType = EltType;
770 if (!AlignAsType && Kind == PPC64_SVR4_ABIKind::ELFv2 &&
777 FloatUsesVector(
QualType(AlignAsType, 0));
790bool PPC64_SVR4_ABIInfo::isHomogeneousAggregateBaseType(
QualType Ty)
const {
794 if (BT->
getKind() == BuiltinType::Float ||
795 BT->
getKind() == BuiltinType::Double ||
796 BT->
getKind() == BuiltinType::LongDouble ||
797 BT->
getKind() == BuiltinType::Ibm128 ||
798 (getContext().getTargetInfo().hasFloat128Type() &&
799 (BT->
getKind() == BuiltinType::Float128))) {
806 if (getContext().getTypeSize(VT) == 128)
812bool PPC64_SVR4_ABIInfo::isHomogeneousAggregateSmallEnough(
813 const Type *
Base, uint64_t Members)
const {
817 ((getContext().getTargetInfo().hasFloat128Type() &&
818 Base->isFloat128Type()) ||
819 Base->isVectorType()) ? 1
820 : (getContext().getTypeSize(
Base) + 63) / 64;
823 return Members * NumRegs <= 8;
827PPC64_SVR4_ABIInfo::classifyArgumentType(
QualType Ty)
const {
838 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
840 else if (Size < 128) {
841 llvm::Type *CoerceTy = llvm::IntegerType::get(getVMContext(), Size);
847 if (EIT->getNumBits() > 128)
848 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
853 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
856 uint64_t ABIAlign = getParamTypeAlignment(Ty).getQuantity();
862 if (Kind == PPC64_SVR4_ABIKind::ELFv2 &&
863 isHomogeneousAggregate(Ty,
Base, Members)) {
864 llvm::Type *BaseTy = CGT.ConvertType(
QualType(
Base, 0));
865 llvm::Type *CoerceTy = llvm::ArrayType::get(BaseTy, Members);
873 uint64_t Bits = getContext().getTypeSize(Ty);
874 if (Bits > 0 && Bits <= 8 * GPRBits) {
875 llvm::Type *CoerceTy;
881 llvm::IntegerType::get(getVMContext(), llvm::alignTo(Bits, 8));
886 uint64_t NumRegs = llvm::alignTo(Bits, RegBits) / RegBits;
887 llvm::Type *RegTy = llvm::IntegerType::get(getVMContext(), RegBits);
888 CoerceTy = llvm::ArrayType::get(RegTy, NumRegs);
897 getDataLayout().getAllocaAddrSpace(),
898 true, TyAlign > ABIAlign);
901 return (isPromotableTypeForABI(Ty)
907PPC64_SVR4_ABIInfo::classifyReturnType(
QualType RetTy)
const {
919 return getNaturalAlignIndirect(RetTy,
920 getDataLayout().getAllocaAddrSpace());
921 else if (Size < 128) {
922 llvm::Type *CoerceTy = llvm::IntegerType::get(getVMContext(), Size);
928 if (EIT->getNumBits() > 128)
929 return getNaturalAlignIndirect(
930 RetTy, getDataLayout().getAllocaAddrSpace(),
false);
936 if (Kind == PPC64_SVR4_ABIKind::ELFv2 &&
937 isHomogeneousAggregate(RetTy,
Base, Members)) {
938 llvm::Type *BaseTy = CGT.ConvertType(
QualType(
Base, 0));
939 llvm::Type *CoerceTy = llvm::ArrayType::get(BaseTy, Members);
944 uint64_t Bits = getContext().getTypeSize(RetTy);
945 if (Kind == PPC64_SVR4_ABIKind::ELFv2 && Bits <= 2 * GPRBits) {
949 llvm::Type *CoerceTy;
950 if (Bits > GPRBits) {
951 CoerceTy = llvm::IntegerType::get(getVMContext(), GPRBits);
952 CoerceTy = llvm::StructType::get(CoerceTy, CoerceTy);
955 llvm::IntegerType::get(getVMContext(), llvm::alignTo(Bits, 8));
960 return getNaturalAlignIndirect(RetTy, getDataLayout().getAllocaAddrSpace());
970 auto TypeInfo = getContext().getTypeInfoInChars(Ty);
983 if (EltSize < SlotSize)
1001 SlotSize,
true, Slot,
1006PPC64_SVR4_TargetCodeGenInfo::initDwarfEHRegSizeTable(
1013void PPC64_SVR4_TargetCodeGenInfo::emitTargetMetadata(
1015 const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames)
const {
1019 if (flt == &llvm::APFloat::PPCDoubleDouble())
1020 CGM.
getModule().addModuleFlag(llvm::Module::Error,
"float-abi",
1021 llvm::MDString::get(Ctx,
"doubledouble"));
1022 else if (flt == &llvm::APFloat::IEEEquad())
1023 CGM.
getModule().addModuleFlag(llvm::Module::Error,
"float-abi",
1024 llvm::MDString::get(Ctx,
"ieeequad"));
1025 else if (flt == &llvm::APFloat::IEEEdouble())
1026 CGM.
getModule().addModuleFlag(llvm::Module::Error,
"float-abi",
1027 llvm::MDString::get(Ctx,
"ieeedouble"));
1038std::unique_ptr<TargetCodeGenInfo>
1040 return std::make_unique<AIXTargetCodeGenInfo>(CGM.
getTypes(), Is64Bit);
1043std::unique_ptr<TargetCodeGenInfo>
1045 bool RetSmallStructInRegABI = PPC32TargetCodeGenInfo::isStructReturnInRegABI(
1047 return std::make_unique<PPC32TargetCodeGenInfo>(CGM.
getTypes(), SoftFloatABI,
1048 RetSmallStructInRegABI);
1051std::unique_ptr<TargetCodeGenInfo>
1053 return std::make_unique<PPC64TargetCodeGenInfo>(CGM.
getTypes());
1058 return std::make_unique<PPC64_SVR4_TargetCodeGenInfo>(CGM.
getTypes(), Kind,
static RValue complexTempStructure(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, CharUnits SlotSize, CharUnits EltSize, const ComplexType *CTy)
static bool PPC_initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address, bool Is64Bit, bool IsAIX)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
CharUnits getTypeAlignInChars(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in characters.
TypeInfo getTypeInfo(const Type *T) const
Get the size and alignment of the specified complete type in bits.
TypeInfoChars getTypeInfoInChars(const Type *T) const
CharUnits getDeclAlign(const Decl *D, bool ForAlignof=false) const
Return a conservative estimate of the alignment of the specified decl D.
int64_t toBits(CharUnits CharSize) const
Convert a size in characters to a size in bits.
A fixed int type of a specified bitwidth.
This class is used for builtin types like 'int'.
bool isFloatingPoint() const
CharUnits - This is an opaque type for sizes expressed in character units.
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
CharUnits alignmentOfArrayElement(CharUnits elementSize) const
Given that this is the alignment of the first element of an array, return the minimum alignment of an...
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...
std::vector< std::string > TocDataVarsUserSpecified
List of global variables explicitly specified by the user as toc-data.
std::vector< std::string > NoTocDataVars
List of global variables that over-ride the toc-data default.
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 getIndirect(CharUnits Alignment, unsigned AddrSpace, bool ByVal=true, bool Realign=false, llvm::Type *Padding=nullptr)
static ABIArgInfo getExtend(QualType Ty, llvm::Type *T=nullptr)
static ABIArgInfo getDirectInReg(llvm::Type *T=nullptr)
ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.
CodeGen::CGCXXABI & getCXXABI() const
virtual bool isHomogeneousAggregateBaseType(QualType Ty) const
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const
virtual RValue EmitVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty, AggValueSlot Slot) const =0
EmitVAArg - Emit the target dependent code to load a value of.
virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const =0
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
llvm::Value * emitRawPointer(CodeGenFunction &CGF) const
Return the pointer contained in this class after authenticating it and adding offset to it if necessa...
CharUnits getAlignment() const
llvm::Type * getElementType() const
Return the type of the values stored in this address.
Address withElementType(llvm::Type *ElemTy) const
Return address with different element type, but same pointer and alignment.
Address CreateConstInBoundsByteGEP(Address Addr, CharUnits Offset, const llvm::Twine &Name="")
Given a pointer to i8, adjust it by a given constant offset.
llvm::LoadInst * CreateLoad(Address Addr, const llvm::Twine &Name="")
RecordArgABI
Specify how one should pass an argument of a record type.
@ RAA_DirectInMemory
Pass it on the stack using its defined layout.
CGFunctionInfo - Class to encapsulate the information about a function definition.
ABIArgInfo & getReturnInfo()
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
llvm::Type * ConvertType(QualType T)
llvm::BasicBlock * createBasicBlock(const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr)
createBasicBlock - Create an LLVM basic block.
RValue EmitLoadOfAnyValue(LValue V, AggValueSlot Slot=AggValueSlot::ignored(), SourceLocation Loc={})
Like EmitLoadOfLValue but also handles complex and aggregate types.
ASTContext & getContext() const
llvm::Type * ConvertTypeForMem(QualType T)
void EmitBranch(llvm::BasicBlock *Block)
EmitBranch - Emit a branch to the specified basic block from the current insert block,...
LValue MakeAddrLValue(Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
void EmitBlock(llvm::BasicBlock *BB, bool IsFinished=false)
EmitBlock - Emit the given block.
This class organizes the cross-function state that is used while generating LLVM code.
llvm::Module & getModule() const
DiagnosticsEngine & getDiags() const
CodeGenTypes & getTypes()
const TargetInfo & getTarget() const
const llvm::DataLayout & getDataLayout() const
const llvm::Triple & getTriple() const
const CodeGenOptions & getCodeGenOpts() const
llvm::LLVMContext & getLLVMContext()
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
bool isLongDoubleReferenced() const
DefaultABIInfo - The default implementation for ABI specific details.
ABIArgInfo classifyArgumentType(QualType RetTy) const
RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const override
EmitVAArg - Emit the target dependent code to load a value of.
ABIArgInfo classifyReturnType(QualType RetTy) const
void computeInfo(CGFunctionInfo &FI) const override
RValue - This trivial value class is used to represent the result of an expression that is evaluated.
static RValue getAggregate(Address addr, bool isVolatile=false)
Convert an Address to an RValue.
static RValue getComplex(llvm::Value *V1, llvm::Value *V2)
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
virtual bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
Initializes the given DWARF EH register-size table, a char*.
virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the g...
virtual int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const
Determines the DWARF register number for the stack pointer, for exception-handling purposes.
virtual void emitTargetMetadata(CodeGen::CodeGenModule &CGM, const llvm::MapVector< GlobalDecl, StringRef > &MangledDeclNames) const
emitTargetMetadata - Provides a convenient hook to handle extra target-specific metadata for the give...
Complex values, per C99 6.2.5p11.
QualType getElementType() const
Decl - This represents one declaration (or definition), e.g.
ASTContext & getASTContext() const LLVM_READONLY
SourceLocation getLocation() const
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
A (possibly-)qualified type.
Represents a struct/union/class.
bool hasFlexibleArrayMember() const
const llvm::fltSemantics & getLongDoubleFormat() const
The base class of the type hierarchy.
RecordDecl * getAsRecordDecl() const
Retrieves the RecordDecl this type refers to.
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
bool isAnyComplexType() const
EnumDecl * getAsEnumDecl() const
Retrieves the EnumDecl this type refers to.
bool isIncompleteType(NamedDecl **Def=nullptr) const
Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types,...
bool isVectorType() const
bool isRealFloatingType() const
Floating point categories.
bool isFloatingType() const
const T * getAs() const
Member-template getAs<specific type>'.
@ TLS_None
Not a TLS variable.
Represents a GCC generic vector type.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
CGCXXABI::RecordArgABI getRecordArgABI(const RecordType *RT, CGCXXABI &CXXABI)
bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
std::unique_ptr< TargetCodeGenInfo > createPPC64_SVR4_TargetCodeGenInfo(CodeGenModule &CGM, PPC64_SVR4_ABIKind Kind, bool SoftFloatABI)
Address emitVoidPtrDirectVAArg(CodeGenFunction &CGF, Address VAListAddr, llvm::Type *DirectTy, CharUnits DirectSize, CharUnits DirectAlign, CharUnits SlotSize, bool AllowHigherAlign, bool ForceRightAdjust=false)
Emit va_arg for a platform using the common void* representation, where arguments are simply emitted ...
std::unique_ptr< TargetCodeGenInfo > createAIXTargetCodeGenInfo(CodeGenModule &CGM, bool Is64Bit)
bool isRecordWithSIMDVectorType(ASTContext &Context, QualType Ty)
RValue emitVoidPtrVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType ValueTy, bool IsIndirect, TypeInfoChars ValueInfo, CharUnits SlotSizeAndAlign, bool AllowHigherAlign, AggValueSlot Slot, bool ForceRightAdjust=false)
Emit va_arg for a platform using the common void* representation, where arguments are simply emitted ...
Address emitMergePHI(CodeGenFunction &CGF, Address Addr1, llvm::BasicBlock *Block1, Address Addr2, llvm::BasicBlock *Block2, const llvm::Twine &Name="")
llvm::Value * emitRoundPointerUpToAlignment(CodeGenFunction &CGF, llvm::Value *Ptr, CharUnits Align)
bool isAggregateTypeForABI(QualType T)
const Type * isSingleElementStruct(QualType T, ASTContext &Context)
isSingleElementStruct - Determine if a structure is a "single element struct", i.e.
void AssignToArrayRange(CodeGen::CGBuilderTy &Builder, llvm::Value *Array, llvm::Value *Value, unsigned FirstIndex, unsigned LastIndex)
QualType useFirstFieldIfTransparentUnion(QualType Ty)
Pass transparent unions as if they were the type of the first element.
std::unique_ptr< TargetCodeGenInfo > createPPC32TargetCodeGenInfo(CodeGenModule &CGM, bool SoftFloatABI)
std::unique_ptr< TargetCodeGenInfo > createPPC64TargetCodeGenInfo(CodeGenModule &CGM)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
llvm::IntegerType * Int8Ty
i8, i16, i32, and i64
CharUnits getPointerSize() const
llvm::PointerType * UnqualPtrTy