summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/XRayInstrumentation.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-06-06 22:22:41 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-06-06 22:22:41 +0000
commitfb69e66cffc3ad62fdd76f970ed3b1a15d27cb12 (patch)
tree5229b20b50ddf840fd294cf0dc5b784187417b44 /llvm/lib/CodeGen/XRayInstrumentation.cpp
parent7a52296f1f71d2491ed5738f9552036fa3372fd1 (diff)
downloadbcm5719-llvm-fb69e66cffc3ad62fdd76f970ed3b1a15d27cb12.tar.gz
bcm5719-llvm-fb69e66cffc3ad62fdd76f970ed3b1a15d27cb12.zip
[CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 304839
Diffstat (limited to 'llvm/lib/CodeGen/XRayInstrumentation.cpp')
-rw-r--r--llvm/lib/CodeGen/XRayInstrumentation.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/XRayInstrumentation.cpp b/llvm/lib/CodeGen/XRayInstrumentation.cpp
index f63111c2e60..0ca11c0992d 100644
--- a/llvm/lib/CodeGen/XRayInstrumentation.cpp
+++ b/llvm/lib/CodeGen/XRayInstrumentation.cpp
@@ -1,4 +1,4 @@
-//===-- XRayInstrumentation.cpp - Adds XRay instrumentation to functions. -===//
+//===- XRayInstrumentation.cpp - Adds XRay instrumentation to functions. --===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,20 +14,26 @@
//
//===---------------------------------------------------------------------===//
-#include "llvm/CodeGen/Analysis.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/Triple.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
-#include "llvm/CodeGen/Passes.h"
-#include "llvm/Support/TargetRegistry.h"
+#include "llvm/IR/Attributes.h"
+#include "llvm/IR/Function.h"
+#include "llvm/Pass.h"
#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
namespace {
+
struct XRayInstrumentation : public MachineFunctionPass {
static char ID;
@@ -66,7 +72,8 @@ private:
void prependRetWithPatchableExit(MachineFunction &MF,
const TargetInstrInfo *TII);
};
-} // anonymous namespace
+
+} // end anonymous namespace
void XRayInstrumentation::replaceRetWithPatchableRet(
MachineFunction &MF, const TargetInstrInfo *TII) {
@@ -144,8 +151,8 @@ bool XRayInstrumentation::runOnMachineFunction(MachineFunction &MF) {
// We look for the first non-empty MachineBasicBlock, so that we can insert
// the function instrumentation in the appropriate place.
- auto MBI =
- find_if(MF, [&](const MachineBasicBlock &MBB) { return !MBB.empty(); });
+ auto MBI = llvm::find_if(
+ MF, [&](const MachineBasicBlock &MBB) { return !MBB.empty(); });
if (MBI == MF.end())
return false; // The function is empty.
OpenPOWER on IntegriCloud