This commit is contained in:
Tim Wojtulewicz 2025-09-30 15:57:36 -07:00 committed by GitHub
commit 6c798da579
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -574,7 +574,7 @@ void ScriptFunc::ReplaceBody(const StmtPtr& old_body, StmtPtr new_body) {
if ( new_body ) if ( new_body )
body->stmts = new_body; body->stmts = new_body;
else else
bodies.erase(body); body = bodies.erase(body);
found_it = true; found_it = true;
current_body = *body; current_body = *body;

View file

@ -265,7 +265,7 @@ public:
*/ */
void ReplaceBody(const detail::StmtPtr& old_body, detail::StmtPtr new_body); void ReplaceBody(const detail::StmtPtr& old_body, detail::StmtPtr new_body);
auto CurrentBody() const { return current_body; } const Body& CurrentBody() const { return current_body; }
/** /**
* Returns the function's frame size. * Returns the function's frame size.

View file

@ -127,7 +127,7 @@ void CPPCompile::CreateFunction(const FuncTypePtr& ft, const ProfileFunc* pf, co
body_info[fname] = {.hash = pf->HashVal(), body_info[fname] = {.hash = pf->HashVal(),
.priority = priority, .priority = priority,
.loc = body->GetLocationInfo(), .loc = body->GetLocationInfo(),
.module = module_group, .module = std::move(module_group),
.groups = std::move(attr_groups)}; .groups = std::move(attr_groups)};
body_names.emplace(body.get(), fname); body_names.emplace(body.get(), fname);
} }

View file

@ -880,7 +880,7 @@ void ProfileFuncs::AnalyzeLambdaProfile(const LambdaExpr* l) {
lambda_primaries[l->Name()] = l->PrimaryFunc().get(); lambda_primaries[l->Name()] = l->PrimaryFunc().get();
if ( compute_func_hashes || ! pf->HasHashVal() ) if ( compute_func_hashes || ! pf->HasHashVal() )
ComputeProfileHash(pf); ComputeProfileHash(std::move(pf));
} }
void ProfileFuncs::ComputeProfileHash(std::shared_ptr<ProfileFunc> pf) { void ProfileFuncs::ComputeProfileHash(std::shared_ptr<ProfileFunc> pf) {