#ifndef LLVM_TARGET_TARGETFRAMELOWERING_H
#define LLVM_TARGET_TARGETFRAMELOWERING_H
-#include "llvm/MC/MCDwarf.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/MC/MCDwarf.h"
+#include "llvm/ADT/ArrayRef.h"
#include <utility>
#include <vector>
/// getCompactUnwindEncoding - Get the compact unwind encoding for the
/// function. Return 0 if the compact unwind isn't available.
- virtual uint32_t getCompactUnwindEncoding(const std::vector<MCCFIInstruction>&,
- int /*DataAlignmentFactor*/,
- bool /*IsEH*/) const {
+ virtual uint32_t getCompactUnwindEncoding(ArrayRef<MCCFIInstruction> Instrs,
+ int DataAlignmentFactor,
+ bool IsEH) const {
return 0;
}
};
}
uint32_t X86FrameLowering::
-getCompactUnwindEncoding(const std::vector<MCCFIInstruction> &Instrs,
+getCompactUnwindEncoding(ArrayRef<MCCFIInstruction> Instrs,
int DataAlignmentFactor, bool IsEH) const {
uint32_t Encoding = 0;
int CFAOffset = 0;
SmallVector<unsigned, 8> SavedRegs;
int FramePointerReg = -1;
- for (std::vector<MCCFIInstruction>::const_iterator
+ for (ArrayRef<MCCFIInstruction>::const_iterator
I = Instrs.begin(), E = Instrs.end(); I != E; ++I) {
const MCCFIInstruction &Inst = *I;
MCSymbol *Label = Inst.getLabel();
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
- uint32_t getCompactUnwindEncoding(const std::vector<MCCFIInstruction> &Instrs,
+ uint32_t getCompactUnwindEncoding(ArrayRef<MCCFIInstruction> Instrs,
int DataAlignmentFactor, bool IsEH) const;
};