[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 13:24:27 PDT 2025
================
@@ -5349,6 +5350,40 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
return RValue::get(Result);
}
+ case Builtin::BI__builtin_virtual_member_address: {
+ Address This = EmitLValue(E->getArg(0)).getAddress();
+ APValue ConstMemFun;
+ E->getArg(1)->isCXX11ConstantExpr(getContext(), &ConstMemFun, nullptr);
----------------
shafik wrote:
So we don't care about the return value of this call? I guess b/c we verify in `VirtualMemberAddress`, so we are using this for a side effect?
https://github.com/llvm/llvm-project/pull/135469
More information about the cfe-commits
mailing list