FixedNumOperandTraits and VariadicOperandTraits assumed that, given a
authorJay Foad <jay.foad@gmail.com>
Tue, 11 Jan 2011 15:07:38 +0000 (15:07 +0000)
committerJay Foad <jay.foad@gmail.com>
Tue, 11 Jan 2011 15:07:38 +0000 (15:07 +0000)
commit67c619ba3eae68dcdb3f9340d82b33173aa0c256
tree3c0745fca275d5e4e31f1da2a5a84553fe69bd4a
parent65fdded3197461232d8428af7ddd0107e4a9f946
FixedNumOperandTraits and VariadicOperandTraits assumed that, given a
"this" pointer for any subclass of User, you could static_cast it to
User* and then reinterpret_cast that to Use* to get the end of the
operand list. This isn't a safe assumption in general, because the
static_cast might adjust the "this" pointer. Fixed by having these
OperandTraits classes take an extra template parameter, which is the
subclass of User. This is groundwork for PR889.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123235 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Constants.h
include/llvm/GlobalAlias.h
include/llvm/GlobalVariable.h
include/llvm/InstrTypes.h
include/llvm/Instructions.h
include/llvm/OperandTraits.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/VMCore/ConstantsContext.h