summaryrefslogtreecommitdiff
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-25 10:12:20 -0400
committerBrad King <brad.king@kitware.com>2020-09-28 09:49:08 -0400
commit727ed0c403ad87c5cae84222d7d69b95b665b63f (patch)
treed932b888f9e3196d956ffc62e7fb77b6a09030ea /Source/cmMacroCommand.cxx
parente456dae6693dc3a79e2708481a969b43cda188cf (diff)
downloadcmake-727ed0c403ad87c5cae84222d7d69b95b665b63f.tar.gz
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.
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r--Source/cmMacroCommand.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index c88b343182..91a600e096 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -157,8 +157,7 @@ bool cmMacroFunctionBlocker::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[0] == this->Args[0];
}