cmState: Remove call stack parent tracking.

This was added at a time when I thought the cmState would report errors,
but that is not the direction it is going.  The ordering of the stack of
scopes is canonical and clients are required to maintain it.
This commit is contained in:
Stephen Kelly 2015-08-01 07:29:36 +02:00
parent 6ae8b30bf4
commit af0de01c6b
1 changed files with 1 additions and 11 deletions

View File

@ -20,7 +20,6 @@
struct cmState::SnapshotDataType struct cmState::SnapshotDataType
{ {
cmState::PositionType CallStackParent;
cmState::PositionType DirectoryParent; cmState::PositionType DirectoryParent;
cmState::SnapshotType SnapshotType; cmState::SnapshotType SnapshotType;
cmLinkedTree<std::string>::iterator ExecutionListFile; cmLinkedTree<std::string>::iterator ExecutionListFile;
@ -732,7 +731,6 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
{ {
assert(originSnapshot.IsValid()); assert(originSnapshot.IsValid());
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position); PositionType pos = this->SnapshotData.Extend(originSnapshot.Position);
pos->CallStackParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine; pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand; pos->EntryPointCommand = entryPointCommand;
pos->DirectoryParent = originSnapshot.Position; pos->DirectoryParent = originSnapshot.Position;
@ -754,7 +752,6 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot,
{ {
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
*originSnapshot.Position); *originSnapshot.Position);
pos->CallStackParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine; pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand; pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = FunctionCallType; pos->SnapshotType = FunctionCallType;
@ -772,7 +769,6 @@ cmState::CreateMacroCallSnapshot(cmState::Snapshot originSnapshot,
{ {
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
*originSnapshot.Position); *originSnapshot.Position);
pos->CallStackParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine; pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand; pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = MacroCallType; pos->SnapshotType = MacroCallType;
@ -789,7 +785,6 @@ cmState::CreateCallStackSnapshot(cmState::Snapshot originSnapshot,
{ {
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
*originSnapshot.Position); *originSnapshot.Position);
pos->CallStackParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine; pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand; pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = CallStackType; pos->SnapshotType = CallStackType;
@ -806,7 +801,6 @@ cmState::CreateInlineListFileSnapshot(cmState::Snapshot originSnapshot,
{ {
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position, PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
*originSnapshot.Position); *originSnapshot.Position);
pos->CallStackParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine; pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand; pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = InlineListFileType; pos->SnapshotType = InlineListFileType;
@ -827,11 +821,7 @@ cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot)
prevPos->CompileOptionsPosition = prevPos->CompileOptionsPosition =
prevPos->BuildSystemDirectory->CompileOptions.size(); prevPos->BuildSystemDirectory->CompileOptions.size();
if (prevPos == this->SnapshotData.Root())
{
return Snapshot(this, prevPos); return Snapshot(this, prevPos);
}
return Snapshot(this, originSnapshot.Position->CallStackParent);
} }
cmState::Snapshot::Snapshot(cmState* state) cmState::Snapshot::Snapshot(cmState* state)