summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCModule.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-05-24 06:26:18 +0000
committerDaniel Jasper <djasper@google.com>2013-05-24 06:26:18 +0000
commit01a8079bf2aea993f3dc6d751626bfd7ddb1f11e (patch)
tree8a974b51649c2bad1c79a52e3cf1025c3d2ee9be /llvm/lib/MC/MCModule.cpp
parent1811021ff98a44e2da7061f4a1edb77d7a740a8a (diff)
downloadbcm5719-llvm-01a8079bf2aea993f3dc6d751626bfd7ddb1f11e.tar.gz
bcm5719-llvm-01a8079bf2aea993f3dc6d751626bfd7ddb1f11e.zip
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
Diffstat (limited to 'llvm/lib/MC/MCModule.cpp')
-rw-r--r--llvm/lib/MC/MCModule.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCModule.cpp b/llvm/lib/MC/MCModule.cpp
index 50bac476fa5..17619d9392e 100644
--- a/llvm/lib/MC/MCModule.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud