1 // RUN: llvm-tblgen %s | FileCheck %s
4 defvar LongList = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
10 // CHECK: bit Empty = 1;
11 // CHECK: bit NotEmpty = 0;
13 // CHECK: bit Empty = 0;
14 // CHECK: bit NotEmpty = 1;
16 // CHECK: bit Empty = 0;
17 // CHECK: bit NotEmpty = 1;
20 bit Empty = !empty(ADag);
21 bit NotEmpty = !not(!empty(ADag));
27 def Drec2 : D<(op "string")>;
28 def Drec3 : D<(op "string", 42)>;
33 // CHECK: bit Empty = 1;
34 // CHECK: bit NotEmpty = 0;
36 // CHECK: bit Empty = 0;
37 // CHECK: bit NotEmpty = 1;
39 // CHECK: bit Empty = 0;
40 // CHECK: bit NotEmpty = 1;
42 class L<list<int> Ints> {
43 bit Empty = !empty(Ints);
44 bit NotEmpty = !not(!empty(Ints));
49 def Lrec3 : L<LongList>;
51 // Test !empty(string).
54 // CHECK: bit Empty = 1;
55 // CHECK: bit NotEmpty = 0;
57 // CHECK: bit Empty = 0;
58 // CHECK: bit NotEmpty = 1;
60 // CHECK: bit Empty = 0;
61 // CHECK: bit NotEmpty = 1;
64 bit Empty = !empty(Str);
65 bit NotEmpty = !not(!empty(Str));
68 def Srec1 : S<EmptyStr>;