These inputs were previously modeled as Swift files, which would lead to bizarre situations where parts of the pipeline expecting Swift inputs actually wound up parsing Objective-C.
Instead of taking an out parameter, have it return
the set directly. Also coalesce the two overloads
into a single overload that takes a
`TBDGenDescriptor`.
In c94b952 I accidentally started adding StringRefs to an outer-scope
vector from a local SmallString instead of the ones that lived in the IR
module I was reading from. Instead, put the original symbol name from
the IR instead of the "mangled" (leading _ variant) into the diff list.
The linker expects to see mangled symbols in the TBD, otherwise it won't
be able to link anything. Use LLVM's mangler to mangle them.
Fixes rdar://54055049
Most of AST, Parse, and Sema deal with FileUnits regularly, but SIL
and IRGen certainly don't. Split FileUnit out into its own header to
cut down on recompilation times when something changes.
No functionality change.
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value. This makes the output more readable and less
likely to lose useful warnings. NFC.
It can now:
- not validate (=none)
- validate that all symbols in the IR are also in the TBD (=missing),
- validate the above, and also that all in the TBD are in the IR (=all).
The first and last were switched between with the old boolean flag, the
second is new.