[all-commits] [llvm/llvm-project] 104c2b: [TableGen][Docs] Accept "code" as a Type (#124902)

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Jan 30 05:18:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 104c2b86a5e9f4871707b25399735f0e5db58745
      https://github.com/llvm/llvm-project/commit/104c2b86a5e9f4871707b25399735f0e5db58745
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2025-01-30 (Thu, 30 Jan 2025)

  Changed paths:
    M llvm/docs/TableGen/ProgRef.rst

  Log Message:
  -----------
  [TableGen][Docs] Accept "code" as a Type (#124902)

Previously the Type production did not include "code", which was only
accepted in one place in the grammar:

   BodyItem: (`Type` | "code") `TokIdentifier` ["=" `Value`] ";"

However the parser implementation accepts "code" as a Type with only one
place where it is *not* allowed, corresponding to this production:

   SimpleValue9: `BangOperator` ["<" `Type` ">"] "(" `ValueListNE` ")"

This patch changes the production for Type to include "code", thereby
fixing most occurrences of Type in the grammar, and documents the
restriction for BangOperator Types in the text instead of codifying it
in the grammar.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list