Author: Timm Bäder Date: 2024-03-01T15:28:15+01:00 New Revision: dbf3d779bdb3cc22652b6ab24ac9827e9f228f4e
URL: https://github.com/llvm/llvm-project/commit/dbf3d779bdb3cc22652b6ab24ac9827e9f228f4e DIFF: https://github.com/llvm/llvm-project/commit/dbf3d779bdb3cc22652b6ab24ac9827e9f228f4e.diff LOG: [clang][Interp][NFC] Remove unused paramter We manage the Result through EvaluationResult now. Added: Modified: clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/EvalEmitter.cpp clang/lib/AST/Interp/EvalEmitter.h Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Context.cpp b/clang/lib/AST/Interp/Context.cpp index 0cec0d78326bd6..6121395f5fc4fd 100644 --- a/clang/lib/AST/Interp/Context.cpp +++ b/clang/lib/AST/Interp/Context.cpp @@ -42,7 +42,7 @@ bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) { bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) { bool Recursing = !Stk.empty(); - ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk, Result); + ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk); auto Res = C.interpretExpr(E, /*ConvertResultToRValue=*/E->isGLValue()); @@ -67,7 +67,7 @@ bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) { bool Context::evaluate(State &Parent, const Expr *E, APValue &Result) { bool Recursing = !Stk.empty(); - ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk, Result); + ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk); auto Res = C.interpretExpr(E); if (Res.isInvalid()) { @@ -91,7 +91,7 @@ bool Context::evaluate(State &Parent, const Expr *E, APValue &Result) { bool Context::evaluateAsInitializer(State &Parent, const VarDecl *VD, APValue &Result) { bool Recursing = !Stk.empty(); - ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk, Result); + ByteCodeExprGen<EvalEmitter> C(*this, *P, Parent, Stk); bool CheckGlobalInitialized = shouldBeGloballyIndexed(VD) && diff --git a/clang/lib/AST/Interp/EvalEmitter.cpp b/clang/lib/AST/Interp/EvalEmitter.cpp index c9c2bf9b145b22..bfd502d21b4cec 100644 --- a/clang/lib/AST/Interp/EvalEmitter.cpp +++ b/clang/lib/AST/Interp/EvalEmitter.cpp @@ -18,7 +18,7 @@ using namespace clang; using namespace clang::interp; EvalEmitter::EvalEmitter(Context &Ctx, Program &P, State &Parent, - InterpStack &Stk, APValue &Result) + InterpStack &Stk) : Ctx(Ctx), P(P), S(Parent, P, Stk, Ctx, this), EvalResult(&Ctx) { // Create a dummy frame for the interpreter which does not have locals. S.Current = diff --git a/clang/lib/AST/Interp/EvalEmitter.h b/clang/lib/AST/Interp/EvalEmitter.h index 032c8860ee677a..5b02b992fef6f7 100644 --- a/clang/lib/AST/Interp/EvalEmitter.h +++ b/clang/lib/AST/Interp/EvalEmitter.h @@ -41,8 +41,7 @@ class EvalEmitter : public SourceMapper { InterpState &getState() { return S; } protected: - EvalEmitter(Context &Ctx, Program &P, State &Parent, InterpStack &Stk, - APValue &Result); + EvalEmitter(Context &Ctx, Program &P, State &Parent, InterpStack &Stk); virtual ~EvalEmitter(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits