[Serialization] Always list the bridging header before any imports

This mirrors how a bridging header is processed when compiling source
files: before any of the imports. This is important for LLDB to
recreate the source environment as closely as possible to how the
compiler does it; in the test case being added involving a non-modular
header file, failure to do so resulted in a deserialization
cross-reference crash.

Note that Serialization still sorts imports, which normal resolution
of imports in source does not do. So we're still not consistent. But
this is less important than handling textual includes (bridging
headers) before modular imports.

rdar://problem/40471329
This commit is contained in:
Jordan Rose
2018-06-13 16:20:19 -07:00
parent 07b200130f
commit 6dcda937f0
7 changed files with 69 additions and 18 deletions

View File

@@ -0,0 +1,4 @@
module Module {
umbrella header "modular.h"
module * { export * }
}