Skip to content

Commit

Permalink
[clang][Interp][NFC] Take a const Function pointer in Context::Run()
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Jul 6, 2023
1 parent 9642343 commit 868aa93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/lib/AST/Interp/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/AST/Interp/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> &&R);
Expand Down

0 comments on commit 868aa93

Please sign in to comment.