From 2214dc07649d36e47d11914e1ffc7c56eb40ad73 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Sun, 22 Nov 2009 03:58:57 +0000 Subject: Fix pr5470. Tablegen handles template arguments by temporarily setting their values, resolving references to them, and then removing the definitions. If a template argument is set to an undefined value, we need to resolve references to that argument to an explicit undefined value. The current code leaves the reference to the template argument as it is, which causes an assertion failure later when the definition of the template argument is removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89581 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/TableGen/UnsetBitInit.td | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/TableGen/UnsetBitInit.td (limited to 'test/TableGen') diff --git a/test/TableGen/UnsetBitInit.td b/test/TableGen/UnsetBitInit.td new file mode 100644 index 0000000000..91342ecb96 --- /dev/null +++ b/test/TableGen/UnsetBitInit.td @@ -0,0 +1,10 @@ +// RUN: tblgen %s +class x { + field bits<32> A; +} + +class y B> : x { + let A{21-20} = B; +} + +def z : y<{0,?}>; -- cgit v1.2.3-18-g5258