By populating the memory cache before loading the module, we can avoid a cycle
where a module is imported that is an overlay, which then triggers
ClangImporter, which then (redundantly) triggers the import of the overlay
module, which would reimport the module again, since it's import is still
underway and it hasn't been entered into the cache yet.
rdar://118846313
This is in preparation for fetching informations directly from
the module instead of specifying them on the cmdline. It will
serve us better as it will mimick more accurately the way lldb
is behaving.
This refactoring moves the validation of the modules earlier
so that we can use the validation info to create the CompileUnit.
<rdar://problem/38867076>
`ASTSection_ObjC` tests may be run on any number of operating systems,
not just Linux. No matter the OS, these tests rely on Objective-C being available.
Check for that instead of the OS.