cmMakefile: Simplify ExpandArguments signature

The only call sites that pass the explicit file name argument are in
function blocker `ArgumentsMatch` methods for `function` and `macro`.
We already ensure that they are balanced within a file scope, and the
RAII helpers `BuildsystemFileScope` and `ListFileScope` ensure that the
backtrace and execution list file stacks unwind to the matching level.
Therefore we can assume that the file name where we are checking for
matching arguments matches starting file name where those arguments
first appeared, and do not need to pass it explicitly.
This commit is contained in:
Brad King
2020-09-25 10:12:20 -04:00
parent e456dae669
commit 727ed0c403
4 changed files with 12 additions and 24 deletions

View File

@@ -147,8 +147,7 @@ bool cmFunctionFunctionBlocker::ArgumentsMatch(cmListFileFunction const& lff,
cmMakefile& mf) const
{
std::vector<std::string> expandedArguments;
mf.ExpandArguments(lff.Arguments, expandedArguments,
this->GetStartingContext().FilePath.c_str());
mf.ExpandArguments(lff.Arguments, expandedArguments);
return expandedArguments.empty() ||
expandedArguments.front() == this->Args.front();
}