[PATCH] D113917: Add infrastructure to support matcher names.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 15 10:48:18 PST 2021


ymandel added a comment.

For a little more context: we're working to improve the debuggability of matchers. The first step in that direction seems to be a change of this sort that provides some (dynamic) introspection so that a tool, library, etc. can see some basic information about the matcher.

note that this leaves a fair amount of room for different design decisions. Of all those that we've considered, the most relevant seems to be using an enum for the result of `getName` (that is, the introspection method). We chose a string so as to easily accomodate user-defined matchers, both those defined with the macros and otherwise. However, we are open to different proposals.

In addition, James is preparing a follow up patch with a new matcher that exploits this functionality to create detailed matcher logging, which is really helpful for debugging matchers during development.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113917/new/

https://reviews.llvm.org/D113917



More information about the cfe-commits mailing list