[all-commits] [llvm/llvm-project] 87dc7d: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)
Sergei Barannikov via All-commits
all-commits at lists.llvm.org
Sun Aug 7 09:23:57 PDT 2022
Author: Sergei Barannikov <barannikov88 at gmail.com>
Date: 2022-08-08 (Mon, 08 Aug 2022)
[clang][CodeGen] Factor out Swift ABI hooks (NFCI)
Swift calling conventions stands out in the way that they are lowered in
mostly target-independent manner, with very few customization points.
As such, swift-related methods of ABIInfo do not reference the rest of
ABIInfo and vice versa.
This change follows interface segregation principle; it removes
dependency of SwiftABIInfo on ABIInfo. Targets must now implement
SwiftABIInfo separately if they support Swift calling conventions.
Almost all targets implemented `shouldPassIndirectly` the same way. This
de-facto default implementation has been moved into the base class.
`isSwiftErrorInRegister` used to be virtual, now it is not. It didn't
accept any arguments which could have an effect on the returned value.
This is now a static property of the target ABI.
Reviewed By: rusyaev-roman, inclyc
Differential Revision: https://reviews.llvm.org/D130394
More information about the All-commits