mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IRGen: Disable type layout based value witness generation at Onone
Type layout based witness generation can emit quite complex IR that will lead to code bloat if the llvm optimizer is not run. No need to use type layouts at Onone. rdar://61155295
This commit is contained in:
@@ -1292,6 +1292,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
OPT_disable_type_layouts)) {
|
||||
Opts.UseTypeLayoutValueHandling
|
||||
= A->getOption().matches(OPT_enable_type_layouts);
|
||||
} else if (Opts.OptMode == OptimizationMode::NoOptimization) {
|
||||
// Disable type layouts at Onone except if explictly requested.
|
||||
Opts.UseTypeLayoutValueHandling = false;
|
||||
}
|
||||
|
||||
Opts.UseSwiftCall = Args.hasArg(OPT_enable_swiftcall);
|
||||
|
||||
Reference in New Issue
Block a user