Update varmap.cc

This commit is contained in:
Gregory Morse 2019-07-26 10:30:37 +02:00 committed by GitHub
parent de5be96d8a
commit b915c41764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -289,17 +289,7 @@ bool RangeHint::compareRanges(const RangeHint *a,const RangeHint *b)
type_metatype bmeta = b->type->getMetatype();
if (ameta != bmeta)
return (ameta < bmeta); // Order more specific types first
return true;
}
bool RangeHint::rangesEqual(const RangeHint* a, const RangeHint* b)
{
if (a->sstart == b->sstart && a->size == b->size) {
type_metatype ameta = a->type->getMetatype();
type_metatype bmeta = b->type->getMetatype();
return (ameta == bmeta);
}
return false;
return false; //comp(x, x) must be false for strict weak ordering
}
/// \param spc is the (stack) address space associated with this function's local variables
@ -793,9 +783,6 @@ void MapState::addRange(uintb st,Datatype *ct,uint4 fl,RangeHint::RangeType rt,i
sign_extend(sst,spaceid->getAddrSize()*8-1);
sst = (intb)AddrSpace::addressToByte(sst,spaceid->getWordSize());
RangeHint *range = new RangeHint(st,sz,sst,ct,fl,rt,hi);
if (std::find_if(maplist.begin(), maplist.end(), [range](RangeHint* rh) {
return RangeHint::rangesEqual(rh, range);
}) == maplist.end())
maplist.push_back(range);
#ifdef OPACTION_DEBUG
if (debugon) {