Skip to content

Commit edf07ab

Browse files
committed
[CodeGen][NewPM] Improve start/stop error message
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.
1 parent badfb4b commit edf07ab

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/include/llvm/Passes/CodeGenPassBuilder.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,13 +610,11 @@ Error CodeGenPassBuilder<Derived, TargetMachineT>::verifyStartStop(
610610

611611
if (!Started)
612612
return make_error<StringError>(
613-
"Can't find start pass \"" +
614-
PIC->getPassNameForClassName(Info.StartPass) + "\".",
613+
"Can't find start pass \"" + Info.StartPass + "\".",
615614
std::make_error_code(std::errc::invalid_argument));
616615
if (!Stopped)
617616
return make_error<StringError>(
618-
"Can't find stop pass \"" +
619-
PIC->getPassNameForClassName(Info.StopPass) + "\".",
617+
"Can't find stop pass \"" + Info.StopPass + "\".",
620618
std::make_error_code(std::errc::invalid_argument));
621619
return Error::success();
622620
}

0 commit comments

Comments
 (0)