mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ef99356dfe
commit
35b2a7a545
@ -19,15 +19,14 @@ static bool AtomComp(const MCAtom *L, uint64_t Addr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MCModule::map(MCAtom *NewAtom) {
|
void MCModule::map(MCAtom *NewAtom) {
|
||||||
uint64_t Begin = NewAtom->Begin,
|
uint64_t Begin = NewAtom->Begin;
|
||||||
End = NewAtom->End;
|
|
||||||
|
|
||||||
assert(Begin < End && "Creating MCAtom with endpoints reversed?");
|
assert(Begin < NewAtom->End && "Creating MCAtom with endpoints reversed?");
|
||||||
|
|
||||||
// Check for atoms already covering this range.
|
// Check for atoms already covering this range.
|
||||||
AtomListTy::iterator I = std::lower_bound(atom_begin(), atom_end(),
|
AtomListTy::iterator I = std::lower_bound(atom_begin(), atom_end(),
|
||||||
Begin, AtomComp);
|
Begin, AtomComp);
|
||||||
assert((I == atom_end() || (*I)->getBeginAddr() > End)
|
assert((I == atom_end() || (*I)->getBeginAddr() > NewAtom->End)
|
||||||
&& "Offset range already occupied!");
|
&& "Offset range already occupied!");
|
||||||
|
|
||||||
// Insert the new atom to the list.
|
// Insert the new atom to the list.
|
||||||
|
Loading…
Reference in New Issue
Block a user