summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmListFileCache.cxx1
-rw-r--r--Source/cmListFileCache.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index e465e1a..4d7e1e2 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -377,6 +377,7 @@ cmListFileBacktrace cmListFileBacktrace::Pop() const
cmListFileContext const& cmListFileBacktrace::Top() const
{
assert(this->TopEntry);
+ assert(!this->TopEntry->IsBottom());
return this->TopEntry->Context;
}
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 2c91f7a..faddec7 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -144,7 +144,7 @@ public:
cmListFileBacktrace Pop() const;
// Get the context at the top of the backtrace.
- // Returns an empty context if the backtrace is empty.
+ // This may be called only if Empty() would return false.
cmListFileContext const& Top() const;
// Print the top of the backtrace.