Skip to content

Commit dcab137

Browse files
committed
passes: check if a node is tracked before getting info
1 parent 0d86640 commit dcab137

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

xls/passes/lazy_query_engine.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ class LazyQueryEngine : public internal::CacheableQueryEngine {
188188
const LazyNodeInfo<Info>& info() const { return qe_info(); }
189189

190190
std::optional<SharedLeafTypeTree<Info>> GetInfo(Node* node) const {
191+
if (!IsTracked(node)) {
192+
return std::nullopt;
193+
}
191194
return info_.GetInfo(node);
192195
}
193196

0 commit comments

Comments
 (0)