summaryrefslogtreecommitdiff
path: root/test/TableGen/cast-list-initializer.td
blob: 4c83773a5a79c3757f6ff61b3ac81e9a2bb39621 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: llvm-tblgen %s | FileCheck %s

class Foo<bits<8> b> {
// CHECK: list<int> ListOfInts = [170];
// CHECK: list<int> AnotherList = [170, 7];
  list<int> ListOfInts = [!cast<int>(b)];
  list<int> AnotherList = [!cast<int>(b), !cast<int>({1, 1, 1})];
}

def : Foo<{1, 0, 1, 0, 1, 0, 1, 0}>;