diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-08 21:52:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-17 20:14:37 (GMT) |
commit | fc1c7cf85d045323a38c1de7ada213ecfee542a9 (patch) | |
tree | c5af2358b6ff05121e4cfed187ba58bf1a074681 /Source/cmInstalledFile.cxx | |
parent | 4dc4570734e70c47c8bb6d658c1014f29068e106 (diff) | |
download | CMake-fc1c7cf85d045323a38c1de7ada213ecfee542a9.zip CMake-fc1c7cf85d045323a38c1de7ada213ecfee542a9.tar.gz CMake-fc1c7cf85d045323a38c1de7ada213ecfee542a9.tar.bz2 |
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.
Diffstat (limited to 'Source/cmInstalledFile.cxx')
-rw-r--r-- | Source/cmInstalledFile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index 8c52b48..fa5e815 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -44,7 +44,7 @@ cmInstalledFile::Property::~Property() void cmInstalledFile::SetName(cmMakefile* mf, const std::string& name) { cmListFileBacktrace backtrace = mf->GetBacktrace(); - cmGeneratorExpression ge(&backtrace); + cmGeneratorExpression ge(backtrace); this->Name = name; this->NameExpression = ge.Parse(name).release(); @@ -81,7 +81,7 @@ void cmInstalledFile::AppendProperty(cmMakefile const* mf, const std::string& prop, const char* value, bool /*asString*/) { cmListFileBacktrace backtrace = mf->GetBacktrace(); - cmGeneratorExpression ge(&backtrace); + cmGeneratorExpression ge(backtrace); Property& property = this->Properties[prop]; property.ValueExpressions.push_back(ge.Parse(value).release()); |