From 959905a5adca4dc697160f8cbab302fefe610034 Mon Sep 17 00:00:00 2001 From: Timm Baeder Date: Mon, 28 Apr 2025 14:08:42 +0200 Subject: [clang][bytecode] Don't create Function instances for builtins (#137618) Now that we don't use them anymore in InterpBuiltin.cpp and we don't create frames for them anymore anyway, just don't create Function instances. --- clang/lib/AST/ByteCode/Interp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/AST/ByteCode/Interp.cpp') diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp index af9b3bf..4d89f23 100644 --- a/clang/lib/AST/ByteCode/Interp.cpp +++ b/clang/lib/AST/ByteCode/Interp.cpp @@ -1607,15 +1607,15 @@ bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func, return true; } -bool CallBI(InterpState &S, CodePtr OpPC, const Function *Func, - const CallExpr *CE, uint32_t BuiltinID) { +bool CallBI(InterpState &S, CodePtr OpPC, const CallExpr *CE, + uint32_t BuiltinID) { // A little arbitrary, but the current interpreter allows evaluation // of builtin functions in this mode, with some exceptions. if (BuiltinID == Builtin::BI__builtin_operator_new && S.checkingPotentialConstantExpression()) return false; - return InterpretBuiltin(S, OpPC, Func, CE, BuiltinID); + return InterpretBuiltin(S, OpPC, CE, BuiltinID); } bool CallPtr(InterpState &S, CodePtr OpPC, uint32_t ArgSize, -- cgit v1.1