Skip to content

Commit

Permalink
Make FunctionInfo's assignment operator argument const (#6780)
Browse files Browse the repository at this point in the history
Aside from the fact that there's no need for this to be non-const and
this is the usual way to write an assignment operator, this is also
needed because of a recent change to std::pair
(llvm/llvm-project#89652). This seems to be
forcing pair to want the const version of the assignment operator of its
members.
  • Loading branch information
dschuff committed Jul 23, 2024
1 parent a8066e6 commit 0973589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/passes/Inlining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct FunctionInfo {
}

// Provide an explicit = operator as the |refs| field lacks one by default.
FunctionInfo& operator=(FunctionInfo& other) {
FunctionInfo& operator=(const FunctionInfo& other) {
refs = other.refs.load();
size = other.size;
hasCalls = other.hasCalls;
Expand Down

0 comments on commit 0973589

Please sign in to comment.