Modules: Simplify how DisableGeneratingGlobalModuleIndex is set, likely NFC
DisableGeneratingGlobalModuleIndex was being set by CompilerInstance::findOrCompileModuleAndReadAST most of (but not all of) the times it returned `nullptr` as a "normal" failure. Pull that up to the caller, CompilerInstance::loadModule, to simplify the code. This resolves a number of FIXMEs added during the refactoring in 5cca6223. The extra cases where this is set are all some version of a fatal error, and the only client of the field, shouldBuildGlobalModuleIndex, seems to be unreachable in that case. Even if there is some corner case where this has an effect, it seems like the right/consistent behaviour. Differential Revision: https://reviews.llvm.org/D101672
Loading
Please sign in to comment