isolate Location specifics to private class variables to enforce correct line number ordering

This commit is contained in:
Vern Paxson 2025-07-03 16:41:14 -07:00 committed by Arne Welzel
parent eb6b4a0c46
commit 5c63133226
30 changed files with 172 additions and 136 deletions

View file

@ -148,7 +148,7 @@ void CPPCompile::DeclareSubclass(const FuncTypePtr& ft, const ProfileFunc* pf, c
stmts = pf->ProfiledExpr();
auto loc = stmts->GetLocationInfo();
auto loc_info = string("\"") + loc->filename + "\", " + Fmt(loc->first_line);
auto loc_info = string("\"") + loc->FileName() + "\", " + Fmt(loc->FirstLine());
Emit("%s_cl(const char* name%s) : CPPStmt(name, %s)%s { }", fname, addl_args, loc_info, inits);
// An additional constructor just used to generate place-holder