aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-07 04:42:01 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-07 04:42:01 +0000
commitb99e412650d25776686b46e743751f4ba97a2e4e (patch)
treebe3c1d8301c828eafb6d33f0831389df88721d16
parent944520f38c79f3cbf1abfca92a5414458d639029 (diff)
downloadexternal_llvm-b99e412650d25776686b46e743751f4ba97a2e4e.zip
external_llvm-b99e412650d25776686b46e743751f4ba97a2e4e.tar.gz
external_llvm-b99e412650d25776686b46e743751f4ba97a2e4e.tar.bz2
Use ArrayRef instead of a std::vector&.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134595 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetFrameLowering.h9
-rw-r--r--lib/Target/X86/X86FrameLowering.cpp4
-rw-r--r--lib/Target/X86/X86FrameLowering.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/Target/TargetFrameLowering.h b/include/llvm/Target/TargetFrameLowering.h
index 70cecbd..e3d77cf 100644
--- a/include/llvm/Target/TargetFrameLowering.h
+++ b/include/llvm/Target/TargetFrameLowering.h
@@ -14,8 +14,9 @@
#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>
@@ -193,9 +194,9 @@ public:
/// 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;
}
};
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp
index 08c381f..fb53e27 100644
--- a/lib/Target/X86/X86FrameLowering.cpp
+++ b/lib/Target/X86/X86FrameLowering.cpp
@@ -1032,7 +1032,7 @@ X86FrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
}
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;
@@ -1040,7 +1040,7 @@ getCompactUnwindEncoding(const std::vector<MCCFIInstruction> &Instrs,
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();
diff --git a/lib/Target/X86/X86FrameLowering.h b/lib/Target/X86/X86FrameLowering.h
index f2b8dab..14c31ed 100644
--- a/lib/Target/X86/X86FrameLowering.h
+++ b/lib/Target/X86/X86FrameLowering.h
@@ -60,7 +60,7 @@ public:
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;
};