[llvm-commits] [PATCH] Bug 889: make FixedNumOperandTraits and VariadicOperandTraits more robust
jay.foad at gmail.com
Wed Jan 5 09:29:14 CST 2011
This bug is about removing virtual methods from Value and its subclasses.
While playing with fixes for this bug, I noticed that
FixedNumOperandTraits and VariadicOperandTraits only work for
subclasses of User, where the instance data for User is at offset 0 in
the instance data for the subclass. However, if the subclass has
virtual methods but User does not, this is no longer true. (There are
probably other cases where it would not be true, e.g. for a subclass
that inherits from multiple base classes, and User is not the first
The attached patch fixes this by making FixedNumOperandTraits and
VariadicOperandTraits take an extra template argument specifying the
type of the subclass. It passes "make check".
OK to commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12497 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110105/0ca618b9/attachment.obj
More information about the llvm-commits