fixed load and save blocks insert #42

Merged
Alexander_KS merged 2 commits from CP_blocks_insert into master 2024-04-16 14:36:48 +00:00
Showing only changes of commit 5f69d9c39d - Show all commits

View File

@@ -825,7 +825,7 @@ void createCheckpoints(SgFile* file, const map<string, CommonBlock*>& commonBloc
{
func = file->functions(z);
point = func->lexNext();
while (point && point->lineNumber() < cpLine && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT)
while (point && ((point->fileName() != file->filename()) || (point->lineNumber() < cpLine)) && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT)
point = point->lexNext();
//cp place was found