summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-01-24 23:02:48 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-01-24 23:02:48 +0000
commit8c6ed0f3a081fee5f6e1372c39dbbcec07969ab9 (patch)
tree0aeb2e5f50d9cbf716fb86039acf1df7ea70ef0c /llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h
parent68d7f37d26c8ec621bc43462554526f504e7141d (diff)
downloadbcm5719-llvm-8c6ed0f3a081fee5f6e1372c39dbbcec07969ab9.tar.gz
bcm5719-llvm-8c6ed0f3a081fee5f6e1372c39dbbcec07969ab9.zip
[XCore] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 292988
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h44
1 files changed, 17 insertions, 27 deletions
diff --git a/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h b/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h
index cdcc52fdc32..cf469ec3cf1 100644
--- a/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h
+++ b/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h
@@ -14,50 +14,39 @@
#ifndef LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H
#define LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H
+#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
+#include <cassert>
+#include <utility>
#include <vector>
namespace llvm {
-// Forward declarations
-class Function;
-
/// XCoreFunctionInfo - This class is derived from MachineFunction private
/// XCore target-specific information for each MachineFunction.
class XCoreFunctionInfo : public MachineFunctionInfo {
- virtual void anchor();
- bool LRSpillSlotSet;
+ bool LRSpillSlotSet = false;
int LRSpillSlot;
- bool FPSpillSlotSet;
+ bool FPSpillSlotSet = false;
int FPSpillSlot;
- bool EHSpillSlotSet;
+ bool EHSpillSlotSet = false;
int EHSpillSlot[2];
unsigned ReturnStackOffset;
- bool ReturnStackOffsetSet;
- int VarArgsFrameIndex;
- mutable int CachedEStackSize;
+ bool ReturnStackOffsetSet = false;
+ int VarArgsFrameIndex = 0;
+ mutable int CachedEStackSize = -1;
std::vector<std::pair<MachineBasicBlock::iterator, CalleeSavedInfo>>
SpillLabels;
+ virtual void anchor();
+
public:
- XCoreFunctionInfo() :
- LRSpillSlotSet(false),
- FPSpillSlotSet(false),
- EHSpillSlotSet(false),
- ReturnStackOffsetSet(false),
- VarArgsFrameIndex(0),
- CachedEStackSize(-1) {}
+ XCoreFunctionInfo() = default;
- explicit XCoreFunctionInfo(MachineFunction &MF) :
- LRSpillSlotSet(false),
- FPSpillSlotSet(false),
- EHSpillSlotSet(false),
- ReturnStackOffsetSet(false),
- VarArgsFrameIndex(0),
- CachedEStackSize(-1) {}
+ explicit XCoreFunctionInfo(MachineFunction &MF) {}
- ~XCoreFunctionInfo() {}
+ ~XCoreFunctionInfo() override = default;
void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
@@ -101,6 +90,7 @@ public:
return SpillLabels;
}
};
-} // End llvm namespace
-#endif
+} // end namespace llvm
+
+#endif // LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H
OpenPOWER on IntegriCloud