31 Ty = EnumTy->getDecl()->getIntegerType();
35 if (EIT->getNumBits() >
55 RetTy = EnumTy->getDecl()->getIntegerType();
58 if (EIT->getNumBits() >
84 llvm::Value *Array, llvm::Value *
Value,
85 unsigned FirstIndex,
unsigned LastIndex) {
87 for (
unsigned I = FirstIndex; I <= LastIndex; ++I) {
89 Builder.CreateConstInBoundsGEP1_32(Builder.getInt8Ty(), Array, I);
112 return CXXABI.getRecordArgABI(RD);
127 if (!isa<CXXRecordDecl>(RT->getDecl()) &&
128 !RT->getDecl()->canPassInRegisters()) {
133 return CXXABI.classifyReturnType(FI);
139 if (UD->
hasAttr<TransparentUnionAttr>()) {
140 assert(!UD->
field_empty() &&
"sema created an empty transparent union");
151 llvm::Value *RoundUp = CGF.
Builder.CreateConstInBoundsGEP1_32(
153 return CGF.
Builder.CreateIntrinsic(
154 llvm::Intrinsic::ptrmask, {Ptr->getType(), CGF.
IntPtrTy},
156 nullptr, Ptr->getName() +
".aligned");
161 llvm::Type *DirectTy,
CharUnits DirectSize,
163 bool AllowHigherAlign,
bool ForceRightAdjust) {
173 if (AllowHigherAlign && DirectAlign > SlotSize) {
189 (!DirectTy->isStructTy() || ForceRightAdjust)) {
201 bool ForceRightAdjust) {
208 DirectSize = ValueInfo.
Width;
209 DirectAlign = ValueInfo.
Align;
216 DirectTy = llvm::PointerType::get(CGF.
getLLVMContext(), AllocaAS);
220 DirectAlign, SlotSizeAndAlign,
221 AllowHigherAlign, ForceRightAdjust);
231 llvm::BasicBlock *Block1,
Address Addr2,
232 llvm::BasicBlock *Block2,
233 const llvm::Twine &Name) {
235 llvm::PHINode *PHI = CGF.
Builder.CreatePHI(Addr1.
getType(), 2, Name);
243 bool AllowArrays,
bool AsIfNoUniqueAddr) {
251 bool WasArray =
false;
254 if (AT->isZeroSize())
256 FT = AT->getElementType();
276 if (isa<CXXRecordDecl>(RT->
getDecl()) &&
277 (WasArray || (!AsIfNoUniqueAddr && !FD->
hasAttr<NoUniqueAddressAttr>())))
280 return isEmptyRecord(Context, FT, AllowArrays, AsIfNoUniqueAddr);
284 bool AsIfNoUniqueAddr) {
293 if (
const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
294 for (
const auto &I : CXXRD->bases())
295 if (!
isEmptyRecord(Context, I.getType(),
true, AsIfNoUniqueAddr))
298 for (
const auto *I : RD->
fields())
299 if (!
isEmptyField(Context, I, AllowArrays, AsIfNoUniqueAddr))
323 if (
const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
324 if (CXXRD->isDynamicClass())
327 for (
const auto &I : CXXRD->bases())
332 for (
const auto *I : RD->
fields())
351 if (
const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
352 for (
const auto &I : CXXRD->bases()) {
370 for (
const auto *FD : RD->
fields()) {
384 if (AT->getZExtSize() != 1)
386 FT = AT->getElementType();
421 "Unexpected PaddingType seen in arginfo in generic VAArg emitter!");
424 "Unexpected IndirectRealign seen in arginfo in generic VAArg emitter!");
430 llvm::Type *BaseTy = llvm::PointerType::getUnqual(ElementTy);
433 return Address(Addr, ElementTy, TyAlignForABI);
436 "Unexpected ArgInfo Kind in generic VAArg emitter!");
439 "Unexpected InReg seen in arginfo in generic VAArg emitter!");
441 "Unexpected PaddingType seen in arginfo in generic VAArg emitter!");
443 "Unexpected DirectOffset seen in arginfo in generic VAArg emitter!");
445 "Unexpected CoerceToType seen in arginfo in generic VAArg emitter!");
466 if (
const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
467 for (
const auto &I : CXXRD->bases())
471 for (
const auto *i : RD->
fields()) {
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...