diff --git a/clang/lib/AST/Interp/Context.cpp b/clang/lib/AST/Interp/Context.cpp index 67fb69e6633823..9d093ba1ad65b0 100644 --- a/clang/lib/AST/Interp/Context.cpp +++ b/clang/lib/AST/Interp/Context.cpp @@ -139,7 +139,7 @@ const llvm::fltSemantics &Context::getFloatSemantics(QualType T) const { return Ctx.getFloatTypeSemantics(T); } -bool Context::Run(State &Parent, Function *Func, APValue &Result) { +bool Context::Run(State &Parent, const Function *Func, APValue &Result) { InterpState State(Parent, *P, Stk, *this); State.Current = new InterpFrame(State, Func, /*Caller=*/nullptr, {}); if (Interpret(State, Result)) diff --git a/clang/lib/AST/Interp/Context.h b/clang/lib/AST/Interp/Context.h index 107bb75a46247e..8879186f7072ec 100644 --- a/clang/lib/AST/Interp/Context.h +++ b/clang/lib/AST/Interp/Context.h @@ -70,7 +70,7 @@ class Context final { private: /// Runs a function. - bool Run(State &Parent, Function *Func, APValue &Result); + bool Run(State &Parent, const Function *Func, APValue &Result); /// Checks a result from the interpreter. bool Check(State &Parent, llvm::Expected &&R);