File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,13 @@ void swift::performLLVMOptimizations(const IRGenOptions &Opts,
309
309
if (Opts.PrintInlineTree )
310
310
ModulePasses.add (createInlineTreePrinterPass ());
311
311
312
+ // Make sure we do ARC contraction under optimization. We don't
313
+ // rely on any other LLVM ARC transformations, but we do need ARC
314
+ // contraction to add the objc_retainAutoreleasedReturnValue
315
+ // assembly markers and remove clang.arc.used.
316
+ if (Opts.shouldOptimize () && !DisableObjCARCContract)
317
+ ModulePasses.add (createObjCARCContractPass ());
318
+
312
319
// Do it.
313
320
ModulePasses.run (*Module);
314
321
@@ -531,13 +538,6 @@ bool swift::performLLVM(const IRGenOptions &Opts,
531
538
532
539
legacy::PassManager EmitPasses;
533
540
534
- // Make sure we do ARC contraction under optimization. We don't
535
- // rely on any other LLVM ARC transformations, but we do need ARC
536
- // contraction to add the objc_retainAutoreleasedReturnValue
537
- // assembly markers and remove clang.arc.used.
538
- if (Opts.shouldOptimize () && !DisableObjCARCContract)
539
- EmitPasses.add (createObjCARCContractPass ());
540
-
541
541
// Set up the final emission passes.
542
542
switch (Opts.OutputKind ) {
543
543
case IRGenOutputKind::Module:
You can’t perform that action at this time.
0 commit comments