diff options
author | Brad King <brad.king@kitware.com> | 2020-09-25 11:22:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-28 13:49:07 (GMT) |
commit | 280f3918f3a731f64c94b2b7c912c58d714fc676 (patch) | |
tree | cdca51b1b323038b1eee16f30a8053c4e9343ec2 /Source/cmMakefile.cxx | |
parent | 0e59b45dfce89ea72e07eb5076f1e12326a3f761 (diff) | |
download | CMake-280f3918f3a731f64c94b2b7c912c58d714fc676.zip CMake-280f3918f3a731f64c94b2b7c912c58d714fc676.tar.gz CMake-280f3918f3a731f64c94b2b7c912c58d714fc676.tar.bz2 |
cmMakefile: Simplify GetExecutionContext implementation
This method takes the function name and line from the top of the
current backtrace and then gets the file path from the state's
`GetExecutionListFile`. This exactly matches what the `cmMakefileCall`
constructor does to create the top of the current backtrace anyway,
so we can just take that directly.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d77c4af..1c9aa52 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -285,12 +285,7 @@ cmListFileBacktrace cmMakefile::GetBacktrace(cmCommandContext const& cc) const cmListFileContext cmMakefile::GetExecutionContext() const { - cmListFileContext const& cur = this->Backtrace.Top(); - cmListFileContext lfc; - lfc.Name = cur.Name; - lfc.Line = cur.Line; - lfc.FilePath = this->StateSnapshot.GetExecutionListFile(); - return lfc; + return this->Backtrace.Top(); } void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const |