Merge pull request #20574 from compnerd/lazy-metadata

IRGen: force lazy metadata initialization for PE/COFF
This commit is contained in:
Saleem Abdulrasool
2018-11-15 16:22:18 -08:00
committed by GitHub
4 changed files with 14 additions and 7 deletions

View File

@@ -1059,6 +1059,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.EnableResilienceBypass = true;
}
// PE/COFF cannot deal with the cross-module reference to the metadata parent
// (e.g. NativeObject). Force the lazy initialization of the VWT always.
Opts.LazyInitializeClassMetadata = Triple.isOSBinFormatCOFF();
if (const Arg *A = Args.getLastArg(OPT_read_type_info_path_EQ)) {
Opts.ReadTypeInfoPath = A->getValue();
}