Teach mergefunc that intptr_t is the same width as a pointer. We still can't
merge vector<intptr_t>::push_back() and vector<void*>::push_back() because Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent. llvm-svn: 124285
This commit is contained in:
parent
fb622f9920
commit
82d4db8662
|
@ -286,8 +286,14 @@ bool FunctionComparator::isEquivalentType(const Type *Ty1,
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue