SuccessChanges

Summary

  1. clang/Modules: Sink CompilerInstance::KnownModules into ModuleMap (details)
Commit 31e14f41a21f9016050a20f07d5da03db2e8c13e by Duncan P. N. Exon Smith
clang/Modules: Sink CompilerInstance::KnownModules into ModuleMap
Avoid use-after-frees when FrontendAction::BeginSourceFile is called
twice on the same CompilerInstance by sinking
CompilerInstance::KnownModules into ModuleMap.  On the way, rename the
map to CachedModuleLoads.  I considered (but rejected) merging this with
ModuleMap::Modules, since that only has top-level modules and this map
includes submodules.
This is an alternative to https://reviews.llvm.org/D58497.  Thanks to
nemanjai for the detailed analysis of the problem!
The file was modifiedclang/include/clang/Lex/ModuleMap.h
The file was modifiedclang/include/clang/Frontend/CompilerInstance.h
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp