summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsLongBranch.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-08-03 22:12:30 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-08-03 22:12:30 +0000
commit79220eaeecccf77591c0a1bdfbd2ecd3ec015e21 (patch)
treee3dd13872a6da5e46bde3a5aa89baa5fde9a99d4 /llvm/lib/Target/Mips/MipsLongBranch.cpp
parent1046aa31488b9c7cc6cfbe8847af699c7afb6887 (diff)
downloadbcm5719-llvm-79220eaeecccf77591c0a1bdfbd2ecd3ec015e21.tar.gz
bcm5719-llvm-79220eaeecccf77591c0a1bdfbd2ecd3ec015e21.zip
[Mips] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 309993
Diffstat (limited to 'llvm/lib/Target/Mips/MipsLongBranch.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsLongBranch.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/Mips/MipsLongBranch.cpp b/llvm/lib/Target/Mips/MipsLongBranch.cpp
index b95f1158fa5..64904ec5fcf 100644
--- a/llvm/lib/Target/Mips/MipsLongBranch.cpp
+++ b/llvm/lib/Target/Mips/MipsLongBranch.cpp
@@ -1,4 +1,4 @@
-//===-- MipsLongBranch.cpp - Emit long branches ---------------------------===//
+//===- MipsLongBranch.cpp - Emit long branches ----------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -16,6 +16,7 @@
#include "MCTargetDesc/MipsABIInfo.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "MCTargetDesc/MipsMCNaCl.h"
+#include "MCTargetDesc/MipsMCTargetDesc.h"
#include "Mips.h"
#include "MipsInstrInfo.h"
#include "MipsMachineFunction.h"
@@ -35,6 +36,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
#include <cassert>
#include <cstdint>
#include <iterator>
@@ -59,8 +61,8 @@ static cl::opt<bool> ForceLongBranch(
namespace {
- typedef MachineBasicBlock::iterator Iter;
- typedef MachineBasicBlock::reverse_iterator ReverseIter;
+ using Iter = MachineBasicBlock::iterator;
+ using ReverseIter = MachineBasicBlock::reverse_iterator;
struct MBBInfo {
uint64_t Size = 0;
@@ -102,10 +104,10 @@ namespace {
unsigned LongBranchSeqSize;
};
- char MipsLongBranch::ID = 0;
-
} // end anonymous namespace
+char MipsLongBranch::ID = 0;
+
/// Iterate over list of Br's operands and search for a MachineBasicBlock
/// operand.
static MachineBasicBlock *getTargetMBB(const MachineInstr &Br) {
@@ -468,7 +470,6 @@ bool MipsLongBranch::runOnMachineFunction(MachineFunction &F) {
const MipsInstrInfo *TII =
static_cast<const MipsInstrInfo *>(STI.getInstrInfo());
-
const TargetMachine& TM = F.getTarget();
IsPIC = TM.isPositionIndependent();
ABI = static_cast<const MipsTargetMachine &>(TM).getABI();
OpenPOWER on IntegriCloud