diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-01 17:41:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-23 15:08:54 (GMT) |
commit | 6954c8936f52dcf7710e4b72b2e090b79bf38d1c (patch) | |
tree | c8a5ece825f63ee46d74de3332069c0d024ad99a /Source/cmState.cxx | |
parent | 1fc645bd9cffb3170743de5c983f2407eeaaa086 (diff) | |
download | CMake-6954c8936f52dcf7710e4b72b2e090b79bf38d1c.zip CMake-6954c8936f52dcf7710e4b72b2e090b79bf38d1c.tar.gz CMake-6954c8936f52dcf7710e4b72b2e090b79bf38d1c.tar.bz2 |
cmState: Add a VariableScope snapshot type.
Match the scopes currently used in cmMakefile for definitions.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index c777514..9e09353 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -20,6 +20,7 @@ struct cmState::SnapshotDataType { + cmState::PositionType ScopeParent; cmState::PositionType DirectoryParent; cmLinkedTree<cmState::PolicyStackEntry>::iterator Policies; cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyRoot; @@ -736,6 +737,7 @@ cmState::Snapshot cmState::CreateBaseSnapshot() { PositionType pos = this->SnapshotData.Extend(this->SnapshotData.Root()); pos->DirectoryParent = this->SnapshotData.Root(); + pos->ScopeParent = this->SnapshotData.Root(); pos->SnapshotType = BaseType; pos->BuildSystemDirectory = this->BuildsystemDirectory.Extend(this->BuildsystemDirectory.Root()); @@ -763,6 +765,7 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot, pos->EntryPointLine = entryPointLine; pos->EntryPointCommand = entryPointCommand; pos->DirectoryParent = originSnapshot.Position; + pos->ScopeParent = originSnapshot.Position; pos->SnapshotType = BuildsystemDirectoryType; pos->BuildSystemDirectory = this->BuildsystemDirectory.Extend( @@ -787,6 +790,7 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot, { PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, *originSnapshot.Position); + pos->ScopeParent = originSnapshot.Position; pos->EntryPointLine = entryPointLine; pos->EntryPointCommand = entryPointCommand; pos->SnapshotType = FunctionCallType; @@ -835,6 +839,21 @@ cmState::CreateCallStackSnapshot(cmState::Snapshot originSnapshot, } cmState::Snapshot +cmState::CreateVariableScopeSnapshot(cmState::Snapshot originSnapshot, + std::string const& entryPointCommand, + long entryPointLine) +{ + PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, + *originSnapshot.Position); + pos->ScopeParent = originSnapshot.Position; + pos->EntryPointLine = entryPointLine; + pos->EntryPointCommand = entryPointCommand; + pos->SnapshotType = VariableScopeType; + + return cmState::Snapshot(this, pos); +} + +cmState::Snapshot cmState::CreateInlineListFileSnapshot(cmState::Snapshot originSnapshot, const std::string& entryPointCommand, long entryPointLine, |