[llvm] [llvm][Tablegen][llvm-tblgen] Added keyword #undef to llvm-tblgen (PR #69135)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 20:59:53 PDT 2023
joker-eph wrote:
> That's already true if you don't have an include guard?
Technically true of course, and it would work with an empty file. But practically speaking without `undef` it's not clear to me how you can actually include multiple times a file to do anything useful?
> I would have concerns about that; including a file multiple times can be useful, and diverging from C's preprocessor sounds like a bad idea and will lead to confusion.
TableGen is not C, and lucky for us... It's pretty rare that people actually want the C preprocessor in a language! Not a model of design in general...
> But regardless, I do not see why that is relevant here.
I don't quite get what you mean about relevance considering what I wrote above.
> #undef is only relevant in the sense that #ifdef can be used to write an include guard, but not always.
(I didn't understand this sentence)
https://github.com/llvm/llvm-project/pull/69135
More information about the llvm-commits
mailing list