[llvm] d49646e - X86AsmPrinter.h - cleanup includes and forward declarations. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 04:18:23 PDT 2020
Author: Simon Pilgrim
Date: 2020-04-19T11:38:50+01:00
New Revision: d49646e6ded643c4ae22ae4cbf0b31299d3a43b8
URL: https://github.com/llvm/llvm-project/commit/d49646e6ded643c4ae22ae4cbf0b31299d3a43b8
DIFF: https://github.com/llvm/llvm-project/commit/d49646e6ded643c4ae22ae4cbf0b31299d3a43b8.diff
LOG: X86AsmPrinter.h - cleanup includes and forward declarations. NFC.
Reduce X86Subtarget.h/MCCodeEmitter.h/TargetMachine.h includes to forward declarations
Add explicit X86Subtarget.h/TargetMachine.h includes to X86AsmPrinter.cpp/X86MCInstLower.cpp
Remove unused MCSymbol forward declaration
Added:
Modified:
llvm/lib/Target/X86/X86AsmPrinter.cpp
llvm/lib/Target/X86/X86AsmPrinter.h
llvm/lib/Target/X86/X86MCInstLower.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index 5cfaf8d4fa05..a9d94344af37 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -18,6 +18,7 @@
#include "TargetInfo/X86TargetInfo.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
+#include "X86Subtarget.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/MachineConstantPool.h"
@@ -40,6 +41,8 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MachineValueType.h"
#include "llvm/Support/TargetRegistry.h"
+#include "llvm/Target/TargetMachine.h"
+
using namespace llvm;
X86AsmPrinter::X86AsmPrinter(TargetMachine &TM,
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.h b/llvm/lib/Target/X86/X86AsmPrinter.h
index 55da096af44e..eb485fa2ecef 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.h
+++ b/llvm/lib/Target/X86/X86AsmPrinter.h
@@ -9,12 +9,9 @@
#ifndef LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
#define LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
-#include "X86Subtarget.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/FaultMaps.h"
#include "llvm/CodeGen/StackMaps.h"
-#include "llvm/MC/MCCodeEmitter.h"
-#include "llvm/Target/TargetMachine.h"
// Implemented in X86MCInstLower.cpp
namespace {
@@ -22,8 +19,10 @@ namespace {
}
namespace llvm {
+class MCCodeEmitter;
class MCStreamer;
-class MCSymbol;
+class X86Subtarget;
+class TargetMachine;
class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
const X86Subtarget *Subtarget = nullptr;
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp
index 6a444116cb2c..4bec5bb91ae9 100644
--- a/llvm/lib/Target/X86/X86MCInstLower.cpp
+++ b/llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -19,6 +19,7 @@
#include "X86AsmPrinter.h"
#include "X86RegisterInfo.h"
#include "X86ShuffleDecodeConstantPool.h"
+#include "X86Subtarget.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/iterator_range.h"
More information about the llvm-commits
mailing list