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

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 14 05:26:21 PST 2019


thakis added a comment.

I think this broke the reverse-iteration bot: http://lab.llvm.org:8011/builders/reverse-iteration/builds/15619

In D71320#1782204 <https://reviews.llvm.org/D71320#1782204>, @rnk wrote:

> 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.


Makes sense, but it's unusual.


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