summaryrefslogtreecommitdiff
path: root/llvm/test/TableGen/listremove.td
blob: d0f18ad75ae1bef5bcf7d468a01bd7c34d8f1081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: llvm-tblgen %s | FileCheck %s

// CHECK: class X {
// CHECK:   list<string> T0 = ["foo", "bar"];
// CHECK:   list<string> T1 = ["foo", "bar"];
// CHECK:   list<string> T2 = ["bar"];
// CHECK:   list<string> T3 = ["foo"];
// CHECK:   list<string> T4 = [];
// CHECK: }

class X {
  list<string> T0 = !listremove(["foo", "bar"], []);
  list<string> T1 = !listremove(["foo", "bar"], ["baz"]);
  list<string> T2 = !listremove(["foo", "bar"], ["foo"]);
  list<string> T3 = !listremove(["foo", "bar"], ["bar", "bar"]);
  list<string> T4 = !listremove(["foo", "bar"], ["bar", "foo"]);
}