xref: /llvm-project/llvm/test/TableGen/cast-list-initializer.td (revision a7bc7db53c9e6a1beeed5c52639a13e42fe4bea9)
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