@@ -341,11 +341,14 @@ SupplementaryOutputPathsComputer::getSupplementaryOutputPathsFromArguments()
341
341
options::OPT_emit_module_summary_path);
342
342
auto abiDescriptorOutput = getSupplementaryFilenamesFromArguments (
343
343
options::OPT_emit_abi_descriptor_path);
344
+ auto optRecordOutput = getSupplementaryFilenamesFromArguments (
345
+ options::OPT_save_optimization_record_path);
344
346
if (!objCHeaderOutput || !moduleOutput || !moduleDocOutput ||
345
347
!dependenciesFile || !referenceDependenciesFile ||
346
348
!serializedDiagnostics || !fixItsOutput || !loadedModuleTrace || !TBD ||
347
349
!moduleInterfaceOutput || !privateModuleInterfaceOutput ||
348
- !moduleSourceInfoOutput || !moduleSummaryOutput || !abiDescriptorOutput) {
350
+ !moduleSourceInfoOutput || !moduleSummaryOutput || !abiDescriptorOutput ||
351
+ !optRecordOutput) {
349
352
return None;
350
353
}
351
354
std::vector<SupplementaryOutputPaths> result;
@@ -368,6 +371,8 @@ SupplementaryOutputPathsComputer::getSupplementaryOutputPathsFromArguments()
368
371
sop.ModuleSourceInfoOutputPath = (*moduleSourceInfoOutput)[i];
369
372
sop.ModuleSummaryOutputPath = (*moduleSummaryOutput)[i];
370
373
sop.ABIDescriptorOutputPath = (*abiDescriptorOutput)[i];
374
+ sop.YAMLOptRecordPath = (*optRecordOutput)[i];
375
+ sop.BitstreamOptRecordPath = (*optRecordOutput)[i];
371
376
result.push_back (sop);
372
377
}
373
378
return result;
@@ -479,6 +484,15 @@ SupplementaryOutputPathsComputer::computeOutputPathsForOneInput(
479
484
file_types::TY_SwiftModuleFile, mainOutputIfUsableForModule,
480
485
defaultSupplementaryOutputPathExcludingExtension);
481
486
487
+ auto YAMLOptRecordPath = determineSupplementaryOutputFilename (
488
+ OPT_save_optimization_record_path, pathsFromArguments.YAMLOptRecordPath ,
489
+ file_types::TY_YAMLOptRecord, " " ,
490
+ defaultSupplementaryOutputPathExcludingExtension);
491
+ auto bitstreamOptRecordPath = determineSupplementaryOutputFilename (
492
+ OPT_save_optimization_record_path, pathsFromArguments.BitstreamOptRecordPath ,
493
+ file_types::TY_BitstreamOptRecord, " " ,
494
+ defaultSupplementaryOutputPathExcludingExtension);
495
+
482
496
SupplementaryOutputPaths sop;
483
497
sop.ObjCHeaderOutputPath = objcHeaderOutputPath;
484
498
sop.ModuleOutputPath = moduleOutputPath;
@@ -494,6 +508,8 @@ SupplementaryOutputPathsComputer::computeOutputPathsForOneInput(
494
508
sop.ModuleSourceInfoOutputPath = moduleSourceInfoOutputPath;
495
509
sop.ModuleSummaryOutputPath = moduleSummaryOutputPath;
496
510
sop.ABIDescriptorOutputPath = ABIDescriptorOutputPath;
511
+ sop.YAMLOptRecordPath = YAMLOptRecordPath;
512
+ sop.BitstreamOptRecordPath = bitstreamOptRecordPath;
497
513
return sop;
498
514
}
499
515
@@ -576,6 +592,8 @@ createFromTypeToPathMap(const TypeToPathMap *map) {
576
592
{file_types::TY_SwiftModuleSummaryFile, paths.ModuleSummaryOutputPath },
577
593
{file_types::TY_PrivateSwiftModuleInterfaceFile,
578
594
paths.PrivateModuleInterfaceOutputPath },
595
+ {file_types::TY_YAMLOptRecord, paths.YAMLOptRecordPath },
596
+ {file_types::TY_BitstreamOptRecord, paths.BitstreamOptRecordPath },
579
597
};
580
598
for (const std::pair<file_types::ID, std::string &> &typeAndString :
581
599
typesAndStrings) {
0 commit comments