Skip to content

Commit 02cb89b

Browse files
authored
[NewPM] Handle error in TargetPassRegistry.inc (#86112)
Mistakenly believing that checking Expected is sufficient.
1 parent 4946cc3 commit 02cb89b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/include/llvm/Passes/TargetPassRegistry.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ if (PopulateClassToPassNames) {
8080
#define ADD_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) \
8181
if (PassBuilder::checkParametrizedPassName(Name, NAME)) { \
8282
auto Params = PassBuilder::parsePassParameters(PARSER, Name, NAME); \
83-
if (!Params) \
83+
if (!Params) { \
84+
errs() << NAME ": " << toString(Params.takeError()) << '\n'; \
8485
return false; \
86+
} \
8587
PM.addPass(CREATE_PASS(Params.get())); \
8688
return true; \
8789
}

0 commit comments

Comments
 (0)