[llvm] dfc3330 - LeonPasses.h - remove unnecessary includes. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 10:37:18 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-07T17:51:12+01:00
New Revision: dfc333050b544173741b66f27872cebb2b7ab983
URL: https://github.com/llvm/llvm-project/commit/dfc333050b544173741b66f27872cebb2b7ab983
DIFF: https://github.com/llvm/llvm-project/commit/dfc333050b544173741b66f27872cebb2b7ab983.diff
LOG: LeonPasses.h - remove unnecessary includes. NFCI.
Reduce to forward declarations and move includes to LeonPasses.cpp where necessary.
Added:
Modified:
llvm/lib/Target/Sparc/LeonPasses.cpp
llvm/lib/Target/Sparc/LeonPasses.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/Sparc/LeonPasses.cpp b/llvm/lib/Target/Sparc/LeonPasses.cpp
index e9d3aaeb9cfe..6ad6940c6b51 100644
--- a/llvm/lib/Target/Sparc/LeonPasses.cpp
+++ b/llvm/lib/Target/Sparc/LeonPasses.cpp
@@ -10,14 +10,13 @@
//===----------------------------------------------------------------------===//
#include "LeonPasses.h"
-#include "llvm/CodeGen/ISDOpcodes.h"
+#include "SparcSubtarget.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/IR/DiagnosticInfo.h"
-#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/raw_ostream.h"
+
using namespace llvm;
LEONMachineFunctionPass::LEONMachineFunctionPass(char &ID)
diff --git a/llvm/lib/Target/Sparc/LeonPasses.h b/llvm/lib/Target/Sparc/LeonPasses.h
index 6baf9fddbe50..9bc4569a1298 100644
--- a/llvm/lib/Target/Sparc/LeonPasses.h
+++ b/llvm/lib/Target/Sparc/LeonPasses.h
@@ -12,14 +12,11 @@
#ifndef LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
#define LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
-#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/Passes.h"
-
-#include "Sparc.h"
-#include "SparcSubtarget.h"
namespace llvm {
+class SparcSubtarget;
+
class LLVM_LIBRARY_VISIBILITY LEONMachineFunctionPass
: public MachineFunctionPass {
protected:
More information about the llvm-commits
mailing list