aboutsummaryrefslogtreecommitdiffstats
path: root/test/TableGen/UnsetBitInit.td
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-11-22 03:58:57 +0000
committerBob Wilson <bob.wilson@apple.com>2009-11-22 03:58:57 +0000
commit2214dc07649d36e47d11914e1ffc7c56eb40ad73 (patch)
tree7681abaab8da58a814deacdd0f7bc5c22224f977 /test/TableGen/UnsetBitInit.td
parentf27f115ef5d62b9dccfb0201da0008a8b8914cd3 (diff)
downloadexternal_llvm-2214dc07649d36e47d11914e1ffc7c56eb40ad73.zip
external_llvm-2214dc07649d36e47d11914e1ffc7c56eb40ad73.tar.gz
external_llvm-2214dc07649d36e47d11914e1ffc7c56eb40ad73.tar.bz2
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
Diffstat (limited to 'test/TableGen/UnsetBitInit.td')
-rw-r--r--test/TableGen/UnsetBitInit.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/TableGen/UnsetBitInit.td b/test/TableGen/UnsetBitInit.td
new file mode 100644
index 0000000..91342ec
--- /dev/null
+++ b/test/TableGen/UnsetBitInit.td
@@ -0,0 +1,10 @@
+// RUN: tblgen %s
+class x {
+ field bits<32> A;
+}
+
+class y<bits<2> B> : x {
+ let A{21-20} = B;
+}
+
+def z : y<{0,?}>;