[PATCH] D53246: [NewPM] teach -passes= to emit meaningful error messages

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 04:14:32 PDT 2018


philip.pfaffe accepted this revision.
philip.pfaffe added a comment.

This looks good to me, minor nits inline.



================
Comment at: tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp:149
+  assert(!Err && "Should have been checked during fuzzer initialization");
+  // silence unused variable warning on release builds
+  consumeError(std::move(Err));
----------------
This comment is misleading now.


================
Comment at: tools/opt/NewPMDriver.cpp:139
+            FunctionPassManager &PM, PassBuilder::OptimizationLevel Level) {
+          auto Err = PB.parsePassPipeline(PM, PeepholeEPPipeline,
+                                          VerifyEachPass, DebugLogging);
----------------
Here and below: Err is unused. Do you want to do anything with it? If you don't then a) you don't need the name and b) a pipeline will cause an unchecked error abort, with an error message that will look weird. So if you don't care about the error at least consume it. I'd prefer printing a nicer message though.


Repository:
  rL LLVM

https://reviews.llvm.org/D53246





More information about the llvm-commits mailing list