1
0
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:
Stephen Kelly
2015-07-08 23:52:51 +02:00
parent 4dc4570734
commit fc1c7cf85d
10 changed files with 32 additions and 33 deletions

View File

@@ -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);