@@ -290,8 +290,8 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
290
290
if (!Conf.AAPipeline .empty ()) {
291
291
AAManager AA;
292
292
if (auto Err = PB.parseAAPipeline (AA, Conf.AAPipeline )) {
293
- report_fatal_error (Twine (" unable to parse AA pipeline description '" ) +
294
- Conf.AAPipeline + " ': " + toString (std::move (Err)));
293
+ reportFatalUsageError (Twine (" unable to parse AA pipeline description '" ) +
294
+ Conf.AAPipeline + " ': " + toString (std::move (Err)));
295
295
}
296
296
// Register the AA manager first so that our version is the one used.
297
297
FAM.registerPass ([&] { return std::move (AA); });
@@ -331,8 +331,9 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
331
331
// Parse a custom pipeline if asked to.
332
332
if (!Conf.OptPipeline .empty ()) {
333
333
if (auto Err = PB.parsePassPipeline (MPM, Conf.OptPipeline )) {
334
- report_fatal_error (Twine (" unable to parse pass pipeline description '" ) +
335
- Conf.OptPipeline + " ': " + toString (std::move (Err)));
334
+ reportFatalUsageError (
335
+ Twine (" unable to parse pass pipeline description '" ) +
336
+ Conf.OptPipeline + " ': " + toString (std::move (Err)));
336
337
}
337
338
} else if (IsThinLTO) {
338
339
MPM.addPass (PB.buildThinLTODefaultPipeline (OL, ImportSummary));
@@ -415,8 +416,8 @@ static void codegen(const Config &Conf, TargetMachine *TM,
415
416
if (!Conf.DwoDir .empty ()) {
416
417
std::error_code EC;
417
418
if (auto EC = llvm::sys::fs::create_directories (Conf.DwoDir ))
418
- report_fatal_error (Twine (" Failed to create directory " ) + Conf.DwoDir +
419
- " : " + EC.message ());
419
+ reportFatalUsageError (Twine (" Failed to create directory " ) + Conf.DwoDir +
420
+ " : " + EC.message ());
420
421
421
422
DwoFile = Conf.DwoDir ;
422
423
sys::path::append (DwoFile, std::to_string (Task) + " .dwo" );
@@ -428,14 +429,14 @@ static void codegen(const Config &Conf, TargetMachine *TM,
428
429
std::error_code EC;
429
430
DwoOut = std::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
430
431
if (EC)
431
- report_fatal_error (Twine (" Failed to open " ) + DwoFile + " : " +
432
- EC.message ());
432
+ reportFatalUsageError (Twine (" Failed to open " ) + DwoFile + " : " +
433
+ EC.message ());
433
434
}
434
435
435
436
Expected<std::unique_ptr<CachedFileStream>> StreamOrErr =
436
437
AddStream (Task, Mod.getModuleIdentifier ());
437
438
if (Error Err = StreamOrErr.takeError ())
438
- report_fatal_error (std::move (Err));
439
+ reportFatalUsageError (std::move (Err));
439
440
std::unique_ptr<CachedFileStream> &Stream = *StreamOrErr;
440
441
TM->Options .ObjectFilenameForDebug = Stream->ObjectPathName ;
441
442
0 commit comments