diff --git a/test/TableGen/BitsInitOverflow.td b/test/TableGen/BitsInitOverflow.td new file mode 100644 index 00000000000..c0b5da90dd8 --- /dev/null +++ b/test/TableGen/BitsInitOverflow.td @@ -0,0 +1,5 @@ +// RUN: not tblgen %s + +def { + bits<2> X = 5; // bitfield is too small, reject +} diff --git a/test/TableGen/IntBitInit.td b/test/TableGen/IntBitInit.td new file mode 100644 index 00000000000..b949bfea7b1 --- /dev/null +++ b/test/TableGen/IntBitInit.td @@ -0,0 +1,5 @@ +// RUN: tblgen %s +def { + bit A = 1; + int B = A; +} diff --git a/test/TableGen/ListConversion.td b/test/TableGen/ListConversion.td new file mode 100644 index 00000000000..773ed6e4d11 --- /dev/null +++ b/test/TableGen/ListConversion.td @@ -0,0 +1,10 @@ +// RUN: tblgen %s +class A; +class B : A; + +def b : B; + +def { + list X = [b]; + list Y = X; +}