Invalidate ConstantManager if TypeManager is invalidated... (#2302)

...as the ConstantManager contains pointers into the TypeManager.
This commit is contained in:
greg-lunarg 2019-01-18 13:49:00 -07:00 committed by Steven Perron
parent d6c067630d
commit d14db341b8

View File

@ -127,6 +127,9 @@ void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) {
constant_mgr_.reset(nullptr);
}
if (analyses_to_invalidate & kAnalysisTypes) {
// The ConstantManager contains Type pointers. If the TypeManager goes
// away, the ConstantManager has to go away.
constant_mgr_.reset(nullptr);
type_mgr_.reset(nullptr);
}