@@ -290,8 +290,8 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
290290 if (!Conf.AAPipeline .empty ()) {
291291 AAManager AA;
292292 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)));
295295 }
296296 // Register the AA manager first so that our version is the one used.
297297 FAM.registerPass ([&] { return std::move (AA); });
@@ -331,9 +331,8 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
331331 // Parse a custom pipeline if asked to.
332332 if (!Conf.OptPipeline .empty ()) {
333333 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)));
337336 }
338337 } else if (IsThinLTO) {
339338 MPM.addPass (PB.buildThinLTODefaultPipeline (OL, ImportSummary));
@@ -416,8 +415,8 @@ static void codegen(const Config &Conf, TargetMachine *TM,
416415 if (!Conf.DwoDir .empty ()) {
417416 std::error_code EC;
418417 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 ());
421420
422421 DwoFile = Conf.DwoDir ;
423422 sys::path::append (DwoFile, std::to_string (Task) + " .dwo" );
@@ -429,14 +428,14 @@ static void codegen(const Config &Conf, TargetMachine *TM,
429428 std::error_code EC;
430429 DwoOut = std::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
431430 if (EC)
432- reportFatalUsageError (Twine (" Failed to open " ) + DwoFile + " : " +
433- EC.message ());
431+ report_fatal_error (Twine (" Failed to open " ) + DwoFile + " : " +
432+ EC.message ());
434433 }
435434
436435 Expected<std::unique_ptr<CachedFileStream>> StreamOrErr =
437436 AddStream (Task, Mod.getModuleIdentifier ());
438437 if (Error Err = StreamOrErr.takeError ())
439- reportFatalUsageError (std::move (Err));
438+ report_fatal_error (std::move (Err));
440439 std::unique_ptr<CachedFileStream> &Stream = *StreamOrErr;
441440 TM->Options .ObjectFilenameForDebug = Stream->ObjectPathName ;
442441
0 commit comments