[clang] [CIR] Upstream support for C++ member function calls (PR #140290)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 09:57:56 PDT 2025
================
@@ -76,11 +77,30 @@ static void appendParameterTypes(const CIRGenTypes &cgt,
cgt.getCGModule().errorNYI("appendParameterTypes: hasExtParameterInfos");
}
+/// Derives the 'this' type for CIRGen purposes, i.e. ignoring method CVR
+/// qualification. Either or both of `rd` and `md` may be null. A null `rd`
+/// indicates that there is no meaningful 'this' type, and a null `md` can occur
+/// when calling a method pointer.
+CanQualType CIRGenTypes::deriveThisType(const CXXRecordDecl *rd,
+ const CXXMethodDecl *md) {
+ QualType recTy;
+ if (rd)
+ recTy = getASTContext().getTagDeclType(rd)->getCanonicalTypeInternal();
+ else
+ recTy = getASTContext().VoidTy;
----------------
andykaylor wrote:
No. It looks like this is an MS ABI thing. Would you prefer I put an `errorNYI` here until we can add a test for it?
https://github.com/llvm/llvm-project/pull/140290
More information about the cfe-commits
mailing list