forked from OSchip/llvm-project
parent
d46fce1141
commit
8a5e10555a
|
@ -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(),
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue