Skip to content

Commit

Permalink
[CodeGen][NewPM] Improve start/stop pass error message CodeGenPassBui…
Browse files Browse the repository at this point in the history
…lder (llvm#102591)

Remove the pass-name-to-class-name lookup because it does not exist
(that's why this error is thrown). Print the name given as the option
instead.

Co-authored-by: Akshat Oke <Akshat.Oke@amd.com>
  • Loading branch information
2 people authored and bwendling committed Aug 15, 2024
1 parent 56045eb commit cc03e94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/include/llvm/Passes/CodeGenPassBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,11 @@ Error CodeGenPassBuilder<Derived, TargetMachineT>::verifyStartStop(

if (!Started)
return make_error<StringError>(
"Can't find start pass \"" +
PIC->getPassNameForClassName(Info.StartPass) + "\".",
"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 cc03e94

Please sign in to comment.