[all-commits] [llvm/llvm-project] 52086f: [llvm][TableGen] Define FieldInit::isConcrete over...

River Riddle via All-commits all-commits at lists.llvm.org
Mon Feb 10 18:05:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 52086f802e37fbb2acc61c49120990b0b3fd10cd
      https://github.com/llvm/llvm-project/commit/52086f802e37fbb2acc61c49120990b0b3fd10cd
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

  Changed paths:
    M llvm/include/llvm/TableGen/Record.h
    M llvm/lib/TableGen/Record.cpp
    A llvm/test/TableGen/field-access-initializers.td

  Log Message:
  -----------
  [llvm][TableGen] Define FieldInit::isConcrete overload

Summary:
There are a few field init values that are concrete but not complete/foldable (e.g. `?`). This allows for using those values as initializers without erroring out.

Example:

```
class A {
  string value = ?;
}
class B<A impl> : A {
  let value = impl.value; // This currently emits an error.
  let value = ?;          // This doesn't emit an error.
}
```

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




More information about the All-commits mailing list