diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-06-19 20:18:59 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-06-19 20:18:59 +0000 |
commit | 7ab184a2a1cbf5b5b340d663e07550659438ed7c (patch) | |
tree | 1659554248636235e68c81f3701d0d1693d27224 | |
parent | ad966ea7a81a538425d5319f6d8568e460639e54 (diff) | |
download | external_llvm-7ab184a2a1cbf5b5b340d663e07550659438ed7c.zip external_llvm-7ab184a2a1cbf5b5b340d663e07550659438ed7c.tar.gz external_llvm-7ab184a2a1cbf5b5b340d663e07550659438ed7c.tar.bz2 |
Allow creation of single-byte MCAtoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184344 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/MC/MCModule.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCObjectDisassembler.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCModule.cpp b/lib/MC/MCModule.cpp index 17619d9..5890b4b 100644 --- a/lib/MC/MCModule.cpp +++ b/lib/MC/MCModule.cpp @@ -21,7 +21,7 @@ static bool AtomComp(const MCAtom *L, uint64_t Addr) { void MCModule::map(MCAtom *NewAtom) { uint64_t Begin = NewAtom->Begin; - assert(Begin < NewAtom->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(), diff --git a/lib/MC/MCObjectDisassembler.cpp b/lib/MC/MCObjectDisassembler.cpp index bb3de17..1ea6eed 100644 --- a/lib/MC/MCObjectDisassembler.cpp +++ b/lib/MC/MCObjectDisassembler.cpp @@ -126,6 +126,7 @@ void MCObjectDisassembler::buildCFG(MCModule *Module) { MCTextAtom *TA = dyn_cast<MCTextAtom>(*AI); if (!TA) continue; Calls.insert(TA->getBeginAddr()); + BBInfos[TA->getBeginAddr()].Atom = TA; for (MCTextAtom::const_iterator II = TA->begin(), IE = TA->end(); II != IE; ++II) { if (MIA.isTerminator(II->Inst)) @@ -145,7 +146,6 @@ void MCObjectDisassembler::buildCFG(MCModule *Module) { MCAtom *A = Module->findAtomContaining(*SI); if (!A) continue; MCTextAtom *TA = cast<MCTextAtom>(A); - BBInfos[TA->getBeginAddr()].Atom = TA; if (TA->getBeginAddr() == *SI) continue; MCTextAtom *NewAtom = TA->split(*SI); |