[all-commits] [llvm/llvm-project] f2a643: [llvm][TableGen] Add a !initialized predicate to a...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Wed Nov 27 20:19:50 PST 2024


  Branch: refs/heads/users/krzysz00/initialized-predicate-tblgen
  Home:   https://github.com/llvm/llvm-project
  Commit: f2a6438c2a15203856640b9771dd8cf8a06eea1e
      https://github.com/llvm/llvm-project/commit/f2a6438c2a15203856640b9771dd8cf8a06eea1e
  Author: Krzysztof Drewniak <krzysdrewniak at gmail.com>
  Date:   2024-11-27 (Wed, 27 Nov 2024)

  Changed paths:
    M llvm/docs/TableGen/ProgRef.rst
    M llvm/include/llvm/TableGen/Record.h
    M llvm/lib/TableGen/Record.cpp
    M llvm/lib/TableGen/TGLexer.cpp
    M llvm/lib/TableGen/TGLexer.h
    M llvm/lib/TableGen/TGParser.cpp
    A llvm/test/TableGen/initialized.td

  Log Message:
  -----------
  [llvm][TableGen] Add a !initialized predicate to allow testing for ?

There are cases (like in an upcoming patch to MLIR's `Property` class) where
the ? value is a useful null value. However, existing predicates make ti difficult
to test if the value in a record one is operating is ? or not.

This commit adds the !initialized predicate, which is 1 on concrete, non-? values
and 0 on ?.



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