================ @@ -1144,11 +1167,13 @@ bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo &FI) const { if (!RD) return false; - bool isTrivialForABI = RD->canPassInRegisters() && - isTrivialForMSVC(RD, FI.getReturnType(), CGM); - // MSVC always returns structs indirectly from C++ instance methods. - bool isIndirectReturn = !isTrivialForABI || FI.isInstanceMethod(); + bool isIndirectReturn = FI.isInstanceMethod(); ---------------- MaxEW707 wrote:
I intentionally moved this around to try to reduce calling `isTrivialForMSVC` for methods and potentially now hitting the recursive field loop I added above. Since methods always return indirectly we can avoid all these extra checks up front. Let me know if you prefer this being a separate PR. https://github.com/llvm/llvm-project/pull/90547 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits