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

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 13 10:07:40 PDT 2018


fedor.sergeev created this revision.
fedor.sergeev added reviewers: philip.pfaffe, chandlerc, skatkov, reames.
Herald added subscribers: dang, dexonsmith, steven_wu, mgorny, mehdi_amini.

All the PassBuilder::parse interfaces now return descriptive StringError
instead of a plain bool. It allows to make -passes/aa-pipeline parsing
errors context-specific and thus less confusing.

TODO: ideally we should also make suggestions for misspelled pass names,
but that requires some extensions to PassBuilder.


Repository:
  rL LLVM

https://reviews.llvm.org/D53246

Files:
  include/llvm/Passes/PassBuilder.h
  lib/LTO/LTOBackend.cpp
  lib/Passes/PassBuilder.cpp
  test/Other/pass-pipeline-parsing.ll
  test/tools/llvm-lto2/X86/pipeline.ll
  test/tools/llvm-opt-fuzzer/command-line.ll
  tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
  tools/opt/NewPMDriver.cpp
  unittests/IR/CMakeLists.txt
  unittests/IR/PassBuilderCallbacksTest.cpp
  unittests/Passes/CMakeLists.txt
  unittests/Passes/PluginsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53246.169569.patch
Type: text/x-patch
Size: 61744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181013/2dbf621d/attachment-0001.bin>


More information about the llvm-commits mailing list