@@ -421,8 +421,8 @@ static const PassInfo *getPassInfo(StringRef PassName) {
421421 const PassRegistry &PR = *PassRegistry::getPassRegistry ();
422422 const PassInfo *PI = PR.getPassInfo (PassName);
423423 if (!PI)
424- report_fatal_error (Twine (' \" ' ) + Twine (PassName) +
425- Twine (" \" pass is not registered." ));
424+ reportFatalUsageError (Twine (' \" ' ) + Twine (PassName) +
425+ Twine (" \" pass is not registered." ));
426426 return PI;
427427}
428428
@@ -438,7 +438,7 @@ getPassNameAndInstanceNum(StringRef PassName) {
438438
439439 unsigned InstanceNum = 0 ;
440440 if (!InstanceNumStr.empty () && InstanceNumStr.getAsInteger (10 , InstanceNum))
441- report_fatal_error (" invalid pass instance specifier " + PassName);
441+ reportFatalUsageError (" invalid pass instance specifier " + PassName);
442442
443443 return std::make_pair (Name, InstanceNum);
444444}
@@ -465,11 +465,11 @@ void TargetPassConfig::setStartStopPasses() {
465465 StopBefore = getPassIDFromName (StopBeforeName);
466466 StopAfter = getPassIDFromName (StopAfterName);
467467 if (StartBefore && StartAfter)
468- report_fatal_error (Twine (StartBeforeOptName) + Twine (" and " ) +
469- Twine (StartAfterOptName) + Twine (" specified!" ));
468+ reportFatalUsageError (Twine (StartBeforeOptName) + Twine (" and " ) +
469+ Twine (StartAfterOptName) + Twine (" specified!" ));
470470 if (StopBefore && StopAfter)
471- report_fatal_error (Twine (StopBeforeOptName) + Twine (" and " ) +
472- Twine (StopAfterOptName) + Twine (" specified!" ));
471+ reportFatalUsageError (Twine (StopBeforeOptName) + Twine (" and " ) +
472+ Twine (StopAfterOptName) + Twine (" specified!" ));
473473 Started = (StartAfter == nullptr ) && (StartBefore == nullptr );
474474}
475475
@@ -635,9 +635,9 @@ CodeGenTargetMachineImpl::createPassConfig(PassManagerBase &PM) {
635635
636636TargetPassConfig::TargetPassConfig ()
637637 : ImmutablePass(ID) {
638- report_fatal_error ( " Trying to construct TargetPassConfig without a target "
639- " machine. Scheduling a CodeGen pass without a target "
640- " triple set?" );
638+ reportFatalUsageError ( " trying to construct TargetPassConfig without a target "
639+ " machine. Scheduling a CodeGen pass without a target "
640+ " triple set?" );
641641}
642642
643643bool TargetPassConfig::willCompleteCodeGenPipeline () {
@@ -738,7 +738,7 @@ void TargetPassConfig::addPass(Pass *P) {
738738 if (StartAfter == PassID && StartAfterCount++ == StartAfterInstanceNum)
739739 Started = true ;
740740 if (Stopped && !Started)
741- report_fatal_error (" Cannot stop compilation after pass that is not run" );
741+ reportFatalUsageError (" Cannot stop compilation after pass that is not run" );
742742}
743743
744744// / Add a CodeGen pass at this point in the pipeline after checking for target
@@ -1408,7 +1408,8 @@ bool TargetPassConfig::isCustomizedRegAlloc() {
14081408bool TargetPassConfig::addRegAssignAndRewriteFast () {
14091409 if (RegAlloc != (RegisterRegAlloc::FunctionPassCtor)&useDefaultRegisterAllocator &&
14101410 RegAlloc != (RegisterRegAlloc::FunctionPassCtor)&createFastRegisterAllocator)
1411- report_fatal_error (" Must use fast (default) register allocator for unoptimized regalloc." );
1411+ reportFatalUsageError (
1412+ " Must use fast (default) register allocator for unoptimized regalloc." );
14121413
14131414 addPass (createRegAllocPass (false ));
14141415
0 commit comments