diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-11-22 03:58:57 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-11-22 03:58:57 +0000 |
commit | 2214dc07649d36e47d11914e1ffc7c56eb40ad73 (patch) | |
tree | 7681abaab8da58a814deacdd0f7bc5c22224f977 /test/TableGen | |
parent | f27f115ef5d62b9dccfb0201da0008a8b8914cd3 (diff) |
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')
-rw-r--r-- | test/TableGen/UnsetBitInit.td | 10 |
1 files changed, 10 insertions, 0 deletions
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<bits<2> B> : x { + let A{21-20} = B; +} + +def z : y<{0,?}>; |