File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,12 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
255
255
P.addOnoneSimplification ();
256
256
P.addInitializeStaticGlobals ();
257
257
258
+ // MandatoryPerformanceOptimizations might create specializations that are not
259
+ // used, and by being unused they are might have unspecialized applies.
260
+ // Eliminate them via the DeadFunctionAndGlobalElimination in embedded Swift
261
+ // to avoid getting metadata/existential use errors in them. We don't want to
262
+ // run this pass in regular Swift: Even unused functions are expected to be
263
+ // available in debug (-Onone) builds for debugging and development purposes.
258
264
if (P.getOptions ().EmbeddedSwift ) {
259
265
P.addDeadFunctionAndGlobalElimination ();
260
266
}
You can’t perform that action at this time.
0 commit comments