Skip to content

Commit

Permalink
[CodeGen][NewPM] Improve start/stop error message
Browse files Browse the repository at this point in the history
Remove the pass-name-to-class-name lookup because it does not exist (that's why this error is thrown). Print the given name in the option instead.
  • Loading branch information
optimisan committed Aug 9, 2024
1 parent badfb4b commit e3408f1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions llvm/include/llvm/Passes/CodeGenPassBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,12 @@ Error CodeGenPassBuilder<Derived, TargetMachineT>::verifyStartStop(
return Error::success();

if (!Started)
return make_error<StringError>(
"Can't find start pass \"" +
PIC->getPassNameForClassName(Info.StartPass) + "\".",
std::make_error_code(std::errc::invalid_argument));
return make_error < StringError >
"Can't find start pass \"" + Info.StartPass + "\".",
std::make_error_code(std::errc::invalid_argument);
if (!Stopped)
return make_error<StringError>(
"Can't find stop pass \"" +
PIC->getPassNameForClassName(Info.StopPass) + "\".",
"Can't find stop pass \"" + Info.StopPass + "\".",
std::make_error_code(std::errc::invalid_argument));
return Error::success();
}
Expand Down

0 comments on commit e3408f1

Please sign in to comment.