Author: Timm Bäder Date: 2024-09-10T13:32:25+02:00 New Revision: 46870175c5425997154245cfa5b1bc31c29bdba4
URL: https://github.com/llvm/llvm-project/commit/46870175c5425997154245cfa5b1bc31c29bdba4 DIFF: https://github.com/llvm/llvm-project/commit/46870175c5425997154245cfa5b1bc31c29bdba4.diff LOG: [clang][bytecode][NFC] Fix CallBI function signature This doesn't modify the PC, so pass OpPC as a copy. Added: Modified: clang/lib/AST/ByteCode/Interp.cpp clang/lib/AST/ByteCode/Interp.h Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp index ac02bd6d033487..2fa8b40f6085ad 100644 --- a/clang/lib/AST/ByteCode/Interp.cpp +++ b/clang/lib/AST/ByteCode/Interp.cpp @@ -1177,16 +1177,16 @@ bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func, return true; } -bool CallBI(InterpState &S, CodePtr &PC, const Function *Func, +bool CallBI(InterpState &S, CodePtr OpPC, const Function *Func, const CallExpr *CE, uint32_t BuiltinID) { if (S.checkingPotentialConstantExpression()) return false; - auto NewFrame = std::make_unique<InterpFrame>(S, Func, PC); + auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC); InterpFrame *FrameBefore = S.Current; S.Current = NewFrame.get(); - if (InterpretBuiltin(S, PC, Func, CE, BuiltinID)) { + if (InterpretBuiltin(S, OpPC, Func, CE, BuiltinID)) { NewFrame.release(); return true; } diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h index e345b9ead967ce..7b7c7822e4a925 100644 --- a/clang/lib/AST/ByteCode/Interp.h +++ b/clang/lib/AST/ByteCode/Interp.h @@ -154,7 +154,7 @@ bool Call(InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize); bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize); -bool CallBI(InterpState &S, CodePtr &PC, const Function *Func, +bool CallBI(InterpState &S, CodePtr OpPC, const Function *Func, const CallExpr *CE, uint32_t BuiltinID); bool CallPtr(InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits