merge vector<intptr_t>::push_back() and vector<void*>::push_back() because
Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124285
91177308-0d34-0410-b5e6-
96231b3b80d8
const Type *Ty2) const {
if (Ty1 == Ty2)
return true;
- if (Ty1->getTypeID() != Ty2->getTypeID())
+ if (Ty1->getTypeID() != Ty2->getTypeID()) {
+ if (TD) {
+ LLVMContext &Ctx = Ty1->getContext();
+ if (isa<PointerType>(Ty1) && Ty2 == TD->getIntPtrType(Ctx)) return true;
+ if (isa<PointerType>(Ty2) && Ty1 == TD->getIntPtrType(Ctx)) return true;
+ }
return false;
+ }
switch(Ty1->getTypeID()) {
default: