[clang] [CIR] Implement devirtualized member function calls (PR #195106)
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 2 14:25:37 PDT 2026
================
@@ -123,6 +123,13 @@ CIRGenFunction::emitCXXMemberPointerCallExpr(const CXXMemberCallExpr *ce,
callee, returnValue, argsList, nullptr, loc);
}
+static const CXXRecordDecl *getCXXRecord(const Expr *e) {
----------------
AbdallahRashed wrote:
I copied this function from classic codegen so I did not think that much about it,
I am not sure if I understand you correctly but are you suggesting to only use getBestDynamicClassType and not use the getCXXRecord ?
because as per my understanding both are serving different purpose, getBestDynamicClassType as you mentioned get the dynamic type. meanwhile in getCXXRecord I am getting the static type. both together is helping to determine if the function in the same class or I would need some pointer manipulation which currently not supported.
https://github.com/llvm/llvm-project/pull/195106
More information about the cfe-commits
mailing list