IRGen: Add a new 'Legacy' lowering mode that loads type info from a YAML file

The YAML format is the same one produced by the -dump-type-info
frontend mode.

For now this is only enabled if the -read-type-info-path frontend
flag is specified.

Progress on <rdar://problem/17528739>.
This commit is contained in:
Slava Pestov
2018-10-03 21:01:39 -04:00
parent ffecd5b544
commit 87ec607233
13 changed files with 267 additions and 60 deletions

View File

@@ -1023,6 +1023,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.EnableResilienceBypass = true;
}
if (const Arg *A = Args.getLastArg(OPT_read_type_info_path_EQ)) {
Opts.ReadTypeInfoPath = A->getValue();
}
for (const auto &Lib : Args.getAllArgValues(options::OPT_autolink_library))
Opts.LinkLibraries.push_back(LinkLibrary(Lib, LibraryKind::Library));