const MachineFunction &MF = *MI.getParent()->getParent();
MachineModuleInfo &MMI = MF.getMMI();
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
- const MachineMove *Move = NULL;
+ bool FoundOne = false;
+ (void)FoundOne;
for (std::vector<MachineMove>::iterator I = Moves.begin(),
E = Moves.end(); I != E; ++I) {
if (I->getLabel() == Label) {
- Move = &*I;
- break;
+ EmitCFIFrameMove(*I);
+ FoundOne = true;
}
}
- assert(Move);
- EmitCFIFrameMove(*Move);
+ assert(FoundOne);
}
/// EmitFunctionBody - This method emits the body and trailer for a
.addReg(StackPtr);
if (needsFrameMoves) {
- const MCAsmInfo &MAI = MMI.getContext().getAsmInfo();
- if (MAI.getExceptionHandlingType() == ExceptionHandling::DwarfCFI) {
- MCSymbol *FrameLabel0 = MMI.getContext().CreateTempSymbol();
- BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel0);
- MachineLocation FPSrc0(FramePtr);
- MachineLocation FPDst0(FramePtr, -2 * stackGrowth);
- Moves.push_back(MachineMove(FrameLabel0, FPDst0, FPSrc0));
- }
-
// Mark effective beginning of when frame pointer becomes valid.
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel);