[all-commits] [llvm/llvm-project] 661c95: [NFC][Attr TableGen] Emit Spelling Enum for Attr t...

Erich Keane via All-commits all-commits at lists.llvm.org
Tue Mar 17 12:22:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 661c950630fbc30c49c6a0d3f78eebeb87a2f019
      https://github.com/llvm/llvm-project/commit/661c950630fbc30c49c6a0d3f78eebeb87a2f019
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M clang/utils/TableGen/ClangAttrEmitter.cpp

  Log Message:
  -----------
  [NFC][Attr TableGen] Emit Spelling Enum for Attr types if there >1

Discovered in a downstream, it is often useful to have slightly
different semantics for an attribute based on its namespace, however our
spelling infrastructure doesn't consider namespace when deciding to
elide the enum list.  The result is that the solution for a case where
an attribute has slightly different semantics based on a namespace
requires checking against the integer value, which is fragile.

This patch makes us always emit the spelling enum if there is more than
1 and we're generating the header.

Differential Revision: https://reviews.llvm.org/D76289




More information about the All-commits mailing list