[PATCH] D71320: [IR] Split out target specific intrinsic enums into separate headers

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 10:33:02 PST 2019


rnk added a comment.

In D71320#1780805 <https://reviews.llvm.org/D71320#1780805>, @thakis wrote:

> Any reason these are called .h? All our other tablegen outputs are called .inc.


Yes, they have header guards, they are not textual. Most other tablegen outputs are intended to be used with some kind of xmacro pattern, where the includer sets a macro before including the file. I could've structured things so that there is:

- a per-target .inc file in build/include/llvm/IR/
- a per-target .h file in llvm/include/llvm/IR, not generated

But I felt that it was less boilerplate and code to have tablegen splat out the .h file and include that from .cpp files directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71320





More information about the llvm-commits mailing list