[PATCH] D122665: [demangler] Fix node matchers
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 12:19:24 PDT 2022
dblaikie added inline comments.
================
Comment at: llvm/include/llvm/Demangle/ItaniumDemangle.h:2460-2462
+#ifndef LLVM_UNIT_TEST
#undef FOR_EACH_NODE_KIND
+#endif
----------------
The modules-unfriendly nature of this worries me a bit.
Maybe we could change the FOR_EACH_NODE_KIND to a .def file instead? (basically take the macro out, put it in another (includable, intentionally non-modular) file that calls the includer-defined macro & undefs the macro at the end (so it doesn't persist/pollute other things))
We have a lot of these in LLVM, one example (though it handles a variet of different lists, which adds more complexity than will be needed here) is `llvm/include/llvm/BinaryFormat/Dwarf.def`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122665/new/
https://reviews.llvm.org/D122665
More information about the llvm-commits
mailing list