[ClangImporter] Use Clang's -fembed-bitcode mode when under -embed-bitcode.

This should have no functionality change, but is supposed to keep us from
accidentally relying on the "full" Clang importer when in a backend job.
I tested it by archiving a little iOS app from a developer.

Unfortunately, part of the motivation here was that we'd get error messages when
we pass something Clang doesn't like, and that doesn't seem to be happening.

rdar://problem/21389553

Swift SVN r30407
This commit is contained in:
Jordan Rose
2015-07-20 17:23:51 +00:00
parent 9dccd497e5
commit 0e3e08f0c6
4 changed files with 102 additions and 40 deletions

View File

@@ -769,6 +769,9 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts, ArgList &Args,
Opts.DumpClangDiagnostics |= Args.hasArg(OPT_dump_clang_diagnostics);
if (Args.hasArg(OPT_embed_bitcode))
Opts.Mode = ClangImporterOptions::Modes::EmbedBitcode;
return false;
}