Mercurial > hg > CbC > CbC_llvm
comparison llvm/test/TableGen/isa.td @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: llvm-tblgen %s | FileCheck %s | |
2 // XFAIL: vg_leak | |
3 | |
4 // CHECK: --- Defs --- | |
5 | |
6 // CHECK: def X0 { | |
7 // CHECK: int ret = 0; | |
8 // CHECK: } | |
9 | |
10 // CHECK: def X1 { | |
11 // CHECK: int ret = 1; | |
12 // CHECK: } | |
13 | |
14 // CHECK: def Y0 { | |
15 // CHECK: int ret = 0; | |
16 // CHECK: } | |
17 | |
18 // CHECK: def Y1 { | |
19 // CHECK: int ret = 11; | |
20 // CHECK: } | |
21 | |
22 class A<int dummy>; | |
23 class B<int num> : A<num> { | |
24 int Num = num; | |
25 } | |
26 | |
27 class X<A a> { | |
28 int ret = !isa<B>(a); | |
29 } | |
30 | |
31 class Y<A a> { | |
32 int ret = !if(!isa<B>(a), !cast<B>(a).Num, 0); | |
33 } | |
34 | |
35 def X0 : X<A<0>>; | |
36 def X1 : X<B<0>>; | |
37 | |
38 def Y0 : Y<A<10>>; | |
39 def Y1 : Y<B<11>>; |