cmMakefile: Inline GetExecutionContext at call sites
The method only had one line, and its implementation is more clear at the call sites than the method name.
This commit is contained in:
parent
280f3918f3
commit
68af831505
@ -39,7 +39,7 @@ bool cmCMakeLanguageCommand(std::vector<cmListFileArgument> const& args,
|
||||
}
|
||||
|
||||
cmMakefile& makefile = status.GetMakefile();
|
||||
cmListFileContext context = makefile.GetExecutionContext();
|
||||
cmListFileContext context = makefile.GetBacktrace().Top();
|
||||
|
||||
bool result = false;
|
||||
|
||||
|
@ -179,7 +179,7 @@ bool cmIfCommand(std::vector<cmListFileArgument> const& args,
|
||||
MessageType status;
|
||||
|
||||
cmConditionEvaluator conditionEvaluator(
|
||||
makefile, makefile.GetExecutionContext(), makefile.GetBacktrace());
|
||||
makefile, makefile.GetBacktrace().Top(), makefile.GetBacktrace());
|
||||
|
||||
bool isTrue =
|
||||
conditionEvaluator.IsTrue(expandedArguments, errorString, status);
|
||||
|
@ -283,11 +283,6 @@ cmListFileBacktrace cmMakefile::GetBacktrace(cmCommandContext const& cc) const
|
||||
return this->Backtrace.Push(lfc);
|
||||
}
|
||||
|
||||
cmListFileContext cmMakefile::GetExecutionContext() const
|
||||
{
|
||||
return this->Backtrace.Top();
|
||||
}
|
||||
|
||||
void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const
|
||||
{
|
||||
// Check if current file in the list of requested to trace...
|
||||
@ -3419,7 +3414,7 @@ void cmMakefile::AddFunctionBlocker(std::unique_ptr<cmFunctionBlocker> fb)
|
||||
{
|
||||
if (!this->ExecutionStatusStack.empty()) {
|
||||
// Record the context in which the blocker is created.
|
||||
fb->SetStartingContext(this->GetExecutionContext());
|
||||
fb->SetStartingContext(this->Backtrace.Top());
|
||||
}
|
||||
|
||||
this->FunctionBlockers.push(std::move(fb));
|
||||
|
@ -641,7 +641,6 @@ public:
|
||||
*/
|
||||
cmListFileBacktrace GetBacktrace() const;
|
||||
cmListFileBacktrace GetBacktrace(cmCommandContext const& lfc) const;
|
||||
cmListFileContext GetExecutionContext() const;
|
||||
|
||||
/**
|
||||
* Get the vector of files created by this makefile
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmGeneratorExpression.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmListFileCache.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmMessageType.h"
|
||||
#include "cmPolicies.h"
|
||||
@ -386,7 +387,7 @@ bool TLL::HandleLibrary(ProcessingState currentProcessingState,
|
||||
? cmTarget::KeywordTLLSignature
|
||||
: cmTarget::PlainTLLSignature;
|
||||
if (!this->Target->PushTLLCommandTrace(
|
||||
sig, this->Makefile.GetExecutionContext())) {
|
||||
sig, this->Makefile.GetBacktrace().Top())) {
|
||||
std::ostringstream e;
|
||||
const char* modal = nullptr;
|
||||
MessageType messageType = MessageType::AUTHOR_WARNING;
|
||||
|
Loading…
Reference in New Issue
Block a user