xref: /aosp_15_r20/external/llvm/test/TableGen/cast-list-initializer.td (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1// RUN: llvm-tblgen %s | FileCheck %s
2
3class Foo<bits<8> b> {
4// CHECK: list<int> ListOfInts = [170];
5// CHECK: list<int> AnotherList = [170, 7];
6  list<int> ListOfInts = [!cast<int>(b)];
7  list<int> AnotherList = [!cast<int>(b), !cast<int>({1, 1, 1})];
8}
9
10def : Foo<{1, 0, 1, 0, 1, 0, 1, 0}>;
11