1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Fix unused warning in opt builds.

In these builds, the asserts() are completely compiled out of the code
leaving "End" unused. Directly accessing it, should not have a
performance impact, as it is just a data member.

llvm-svn: 182634
This commit is contained in:
Daniel Jasper 2013-05-24 06:26:18 +00:00
parent eedbfb8aab
commit d428197ca5

View File

@ -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.