mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 10:47:59 +08:00
Genex: Store a backtrace, not a pointer to one.
The storage of a pointer means that the ownership and lifetime are externally determined, which is harder to reason about. It also imposes API constraints, requiring APIs to return references to backtraces. This pointer storage was introduced in commit v3.1.0-rc1~425^2~3 (genex: remove the need for backtraces, 2014-05-23). As backtraces are now cheap to copy around, just do that instead.
This commit is contained in:
@@ -152,7 +152,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
|
||||
}
|
||||
|
||||
cmListFileBacktrace lfbt = this->OutputFileExpr->GetBacktrace();
|
||||
cmGeneratorExpression contentGE(&lfbt);
|
||||
cmGeneratorExpression contentGE(lfbt);
|
||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> inputExpression
|
||||
= contentGE.Parse(inputContent);
|
||||
|
||||
|
Reference in New Issue
Block a user