[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)
Stefan Gränitz via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 04:14:23 PST 2024
================
@@ -741,9 +775,8 @@ Expr *Interpreter::SynthesizeExpr(Expr *E) {
auto *OutValue = CStyleCastPtrExpr(S, Ctx.VoidPtrTy, (uintptr_t)&LastValue);
// Build `__clang_Interpreter_SetValue*` call.
- RuntimeInterfaceBuilder Builder(*this, Ctx, S, E, {ThisInterp, OutValue});
+ ExprResult Result = Builder->getCall(E, {ThisInterp, OutValue});
----------------
weliveindetail wrote:
FindRuntimeInterface() and getCall() are virtual functions now, which introduces a tiny runtime overhead for each synthesized expression. It should be negligible compared to the effort for parsing and compilation, but if it's an issue, I am happy to change it to a call to function pointer.
https://github.com/llvm/llvm-project/pull/83126
More information about the cfe-commits
mailing list