@@ -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
- reportFatalUsageError (Twine (" unable to parse AA pipeline description '" ) +
294
- Conf.AAPipeline + " ': " + toString (std::move (Err)));
293
+ report_fatal_error (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,9 +331,8 @@ 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
- reportFatalUsageError (
335
- Twine (" unable to parse pass pipeline description '" ) +
336
- Conf.OptPipeline + " ': " + toString (std::move (Err)));
334
+ report_fatal_error (Twine (" unable to parse pass pipeline description '" ) +
335
+ Conf.OptPipeline + " ': " + toString (std::move (Err)));
337
336
}
338
337
} else if (IsThinLTO) {
339
338
MPM.addPass (PB.buildThinLTODefaultPipeline (OL, ImportSummary));
@@ -416,8 +415,8 @@ static void codegen(const Config &Conf, TargetMachine *TM,
416
415
if (!Conf.DwoDir .empty ()) {
417
416
std::error_code EC;
418
417
if (auto EC = llvm::sys::fs::create_directories (Conf.DwoDir ))
419
- reportFatalUsageError (Twine (" Failed to create directory " ) + Conf.DwoDir +
420
- " : " + EC.message ());
418
+ report_fatal_error (Twine (" Failed to create directory " ) + Conf.DwoDir +
419
+ " : " + EC.message ());
421
420
422
421
DwoFile = Conf.DwoDir ;
423
422
sys::path::append (DwoFile, std::to_string (Task) + " .dwo" );
@@ -429,14 +428,14 @@ static void codegen(const Config &Conf, TargetMachine *TM,
429
428
std::error_code EC;
430
429
DwoOut = std::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
431
430
if (EC)
432
- reportFatalUsageError (Twine (" Failed to open " ) + DwoFile + " : " +
433
- EC.message ());
431
+ report_fatal_error (Twine (" Failed to open " ) + DwoFile + " : " +
432
+ EC.message ());
434
433
}
435
434
436
435
Expected<std::unique_ptr<CachedFileStream>> StreamOrErr =
437
436
AddStream (Task, Mod.getModuleIdentifier ());
438
437
if (Error Err = StreamOrErr.takeError ())
439
- reportFatalUsageError (std::move (Err));
438
+ report_fatal_error (std::move (Err));
440
439
std::unique_ptr<CachedFileStream> &Stream = *StreamOrErr;
441
440
TM->Options .ObjectFilenameForDebug = Stream->ObjectPathName ;
442
441
0 commit comments