Fix evil TableGen bug in template parameters with defaults.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 25 Mar 2010 06:23:34 +0000 (06:23 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 25 Mar 2010 06:23:34 +0000 (06:23 +0000)
commitd1baa252c41322d3a38d4360ba1dbcc20c0badf9
tree711a7cb3a81f2b77e31f880ef784382f7cb0c691
parentf906cb933e4daa4b77c27941365b79cca1b697e9
Fix evil TableGen bug in template parameters with defaults.

If a TableGen class has an initializer expression containing an X.Y subexpression,
AND X depends on template parameters,
AND those template parameters have defaults,
AND some parameters with defaults are beyond position 1,
THEN parts of the initializer expression are evaluated prematurely with the default values when the first explicit template parameter is substituted, before the remaining explicit template parameters have been substituted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99492 91177308-0d34-0410-b5e6-96231b3b80d8
test/TableGen/2010-03-24-PrematureDefaults.td [new file with mode: 0644]
utils/TableGen/Record.cpp
utils/TableGen/Record.h