diff options
author | Daniel Jasper <djasper@google.com> | 2013-05-24 06:26:18 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-05-24 06:26:18 +0000 |
commit | 35b2a7a54588e17e4de655bfb29c57d072f19904 (patch) | |
tree | 71358a3799c4f1e48915738903a866a154a2352a /lib/MC/MCModule.cpp | |
parent | ef99356dfebb96f6f90efb912c2877214bad060e (diff) | |
download | llvm-35b2a7a54588e17e4de655bfb29c57d072f19904.tar.gz llvm-35b2a7a54588e17e4de655bfb29c57d072f19904.tar.bz2 llvm-35b2a7a54588e17e4de655bfb29c57d072f19904.tar.xz |
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
Diffstat (limited to 'lib/MC/MCModule.cpp')
-rw-r--r-- | lib/MC/MCModule.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/MC/MCModule.cpp b/lib/MC/MCModule.cpp index 50bac476fa..17619d9392 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. |