[llvm] r182634 - Fix unused warning in opt builds.
Daniel Jasper
djasper at google.com
Thu May 23 23:26:19 PDT 2013
Author: djasper
Date: Fri May 24 01:26:18 2013
New Revision: 182634
URL: http://llvm.org/viewvc/llvm-project?rev=182634&view=rev
Log:
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.
Modified:
llvm/trunk/lib/MC/MCModule.cpp
Modified: llvm/trunk/lib/MC/MCModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCModule.cpp?rev=182634&r1=182633&r2=182634&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCModule.cpp (original)
+++ llvm/trunk/lib/MC/MCModule.cpp Fri May 24 01:26:18 2013
@@ -19,15 +19,14 @@ static bool AtomComp(const MCAtom *L, ui
}
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.
More information about the llvm-commits
mailing list