[llvm] 02cb89b - [NewPM] Handle error in TargetPassRegistry.inc (#86112)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 05:09:53 PDT 2024
Author: paperchalice
Date: 2024-03-21T20:09:49+08:00
New Revision: 02cb89b36a7ae9be4ab657306b69dc9d2830d0d5
URL: https://github.com/llvm/llvm-project/commit/02cb89b36a7ae9be4ab657306b69dc9d2830d0d5
DIFF: https://github.com/llvm/llvm-project/commit/02cb89b36a7ae9be4ab657306b69dc9d2830d0d5.diff
LOG: [NewPM] Handle error in TargetPassRegistry.inc (#86112)
Mistakenly believing that checking Expected is sufficient.
Added:
Modified:
llvm/include/llvm/Passes/TargetPassRegistry.inc
Removed:
################################################################################
diff --git a/llvm/include/llvm/Passes/TargetPassRegistry.inc b/llvm/include/llvm/Passes/TargetPassRegistry.inc
index 50766a99f6a72f..b618331c69988e 100644
--- a/llvm/include/llvm/Passes/TargetPassRegistry.inc
+++ b/llvm/include/llvm/Passes/TargetPassRegistry.inc
@@ -80,8 +80,10 @@ if (PopulateClassToPassNames) {
#define ADD_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) \
if (PassBuilder::checkParametrizedPassName(Name, NAME)) { \
auto Params = PassBuilder::parsePassParameters(PARSER, Name, NAME); \
- if (!Params) \
+ if (!Params) { \
+ errs() << NAME ": " << toString(Params.takeError()) << '\n'; \
return false; \
+ } \
PM.addPass(CREATE_PASS(Params.get())); \
return true; \
}
More information about the llvm-commits
mailing list