diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -2482,10 +2482,6 @@ std::make_unique(CGT, /*SwiftErrorInRegister=*/true); } - const X86_64ABIInfo &getABIInfo() const { - return static_cast(TargetCodeGenInfo::getABIInfo()); - } - /// Disable tail call on x86-64. The epilogue code before the tail jump blocks /// autoreleaseRV/retainRV and autoreleaseRV/unsafeClaimRV optimizations. bool markARCOptimizedReturnCallsAsNoTail() const override { return true; } @@ -2522,7 +2518,8 @@ bool HasAVXType = false; for (CallArgList::const_iterator it = args.begin(), ie = args.end(); it != ie; ++it) { - if (getABIInfo().isPassedUsingAVXType(it->Ty)) { + if (static_cast(TargetCodeGenInfo::getABIInfo()) + .isPassedUsingAVXType(it->Ty)) { HasAVXType = true; break; } @@ -6404,10 +6401,6 @@ SwiftInfo = std::make_unique(CGT); } - const ARMABIInfo &getABIInfo() const { - return static_cast(TargetCodeGenInfo::getABIInfo()); - } - int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override { return 13; } @@ -6426,7 +6419,9 @@ } unsigned getSizeOfUnwindException() const override { - if (getABIInfo().isEABI()) return 88; + if (static_cast(TargetCodeGenInfo::getABIInfo()) + .isEABI()) + return 88; return TargetCodeGenInfo::getSizeOfUnwindException(); } @@ -6493,7 +6488,7 @@ Fn->addFnAttr("interrupt", Kind); - ARMABIKind ABI = cast(getABIInfo()).getABIKind(); + ARMABIKind ABI = static_cast(getABIInfo()).getABIKind(); if (ABI == ARMABIKind::APCS) return; @@ -7431,10 +7426,6 @@ class SystemZTargetCodeGenInfo : public TargetCodeGenInfo { ASTContext &Ctx; - const SystemZABIInfo &getABIInfo() const { - return static_cast(TargetCodeGenInfo::getABIInfo()); - } - // These are used for speeding up the search for a visible vector ABI. mutable bool HasVisibleVecABIFlag = false; mutable std::set SeenTypes; @@ -7884,7 +7875,9 @@ // be passed via "hidden" pointer where any extra alignment is not // required (per GCC). const Type *SingleEltTy = - getABIInfo().GetSingleElementType(QualType(Ty, 0)).getTypePtr(); + static_cast(TargetCodeGenInfo::getABIInfo()) + .GetSingleElementType(QualType(Ty, 0)) + .getTypePtr(); bool SingleVecEltStruct = SingleEltTy != Ty && SingleEltTy->isVectorType() && Ctx.getTypeSize(SingleEltTy) == Ctx.getTypeSize(Ty); if (Ty->isVectorType() || SingleVecEltStruct) @@ -11836,10 +11829,6 @@ public: BPFTargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(std::make_unique(CGT)) {} - - const BPFABIInfo &getABIInfo() const { - return static_cast(TargetCodeGenInfo::getABIInfo()); - } }; }