[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 23:11:09 PDT 2025
================
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) {
return Call;
}
+static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) {
+ if (S.checkArgCount(Call, 1))
+ return ExprError();
+ ExprResult ThisArg = S.DefaultFunctionArrayLvalueConversion(Call->getArg(0));
+ if (ThisArg.isInvalid())
+ return ExprError();
+ Call->setArg(0, ThisArg.get());
+ const Expr *Subject = Call->getArg(0);
----------------
cor3ntin wrote:
FirstArg would be a better name, or jusst Arg
https://github.com/llvm/llvm-project/pull/139790
More information about the cfe-commits
mailing list