示例#1
0
文件: MCAssembler.cpp 项目: CPFL/guc
void MCAsmLayout::UpdateForSlide(MCFragment *F, int SlideAmount) {
  // If this fragment wasn't already up-to-date, we don't need to do anything.
  if (!isFragmentUpToDate(F))
    return;

  // Otherwise, reset the last valid fragment to the predecessor of the
  // invalidated fragment.
  LastValidFragment = F->getPrevNode();
  if (!LastValidFragment) {
    unsigned Index = F->getParent()->getLayoutOrder();
    if (Index != 0) {
      MCSectionData *Prev = getSectionOrder()[Index - 1];
      LastValidFragment = &(Prev->getFragmentList().back());
    }
  }
}