diff --git a/lib/MC/MCModule.cpp b/lib/MC/MCModule.cpp index 50bac476fa5..17619d9392e 100644 --- a/lib/MC/MCModule.cpp +++ b/lib/MC/MCModule.cpp @@ -19,15 +19,14 @@ static bool AtomComp(const MCAtom *L, uint64_t Addr) { } void MCModule::map(MCAtom *NewAtom) { - uint64_t Begin = NewAtom->Begin, - End = NewAtom->End; + uint64_t Begin = NewAtom->Begin; - assert(Begin < End && "Creating MCAtom with endpoints reversed?"); + assert(Begin < NewAtom->End && "Creating MCAtom with endpoints reversed?"); // Check for atoms already covering this range. AtomListTy::iterator I = std::lower_bound(atom_begin(), atom_end(), Begin, AtomComp); - assert((I == atom_end() || (*I)->getBeginAddr() > End) + assert((I == atom_end() || (*I)->getBeginAddr() > NewAtom->End) && "Offset range already occupied!"); // Insert the new atom to the list.