Fix the verifier to handle intrinsics with LLVMMatchType parameters, where
authorBob Wilson <bob.wilson@apple.com>
Wed, 29 Jul 2009 16:35:59 +0000 (16:35 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 29 Jul 2009 16:35:59 +0000 (16:35 +0000)
commit1024634df7c0121c6a522e3a6695aec1fbcf6eff
tree36d137b392ea1b4c3b041fa71019bfc62091d638
parent5be9ee399fd0e889f9d9438284439c312bc22e6c
Fix the verifier to handle intrinsics with LLVMMatchType parameters, where
the return type of the intrinsic is not overloaded, i.e., where the type
being matched is some other parameter.  The argument to LLVMMatchType is
an index into the list of overloaded types (ignoring the fixed types),
but VerifyIntrinsicPrototype is expecting its arguments for LLVMMatchType
parameters to be indices into the combined list of _all_ return values and
parameters, not just the overloaded ones.

This patch changes TableGen to keep track for each overloaded type of the
corresponding index into the list of return values and parameters.  It
then generates the values expected by VerifyIntrinsicPrototype.

llvm-svn: 77467
llvm/utils/TableGen/IntrinsicEmitter.cpp