Add a -force-public-linkage IRGen flag for LLDB.

In LLDB expressions, references to private metadata accessors may be
emitted and need to be bound to symbols available in the attached
program, even if these symbols are only supposed to have private
visibility within the program.

Also rdar://problem/48018240
This commit is contained in:
Adrian Prantl
2019-03-26 16:47:02 -07:00
parent 65d4199c7b
commit e1f92cc39e
9 changed files with 71 additions and 3 deletions

View File

@@ -1085,6 +1085,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.EnableResilienceBypass = true;
}
if (Args.hasArg(OPT_force_public_linkage)) {
Opts.ForcePublicLinkage = 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();