]> granicus.if.org Git - llvm/commitdiff
[MSP430] Create a TargetInfo header. NFC
authorRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 23:45:18 +0000 (23:45 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 23:45:18 +0000 (23:45 +0000)
Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360728 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h
lib/Target/MSP430/MSP430AsmPrinter.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp
lib/Target/MSP430/TargetInfo/MSP430TargetInfo.h [new file with mode: 0644]

index 0c2963172406fe48b69a1c9f06df1e99700798b6..a0ec14ae23819b09f531b52922585ce637eaea61 100644 (file)
@@ -9,6 +9,7 @@
 #include "MSP430.h"
 #include "MSP430RegisterInfo.h"
 #include "MCTargetDesc/MSP430MCTargetDesc.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/StringSwitch.h"
index 37e3cb6ebf50ca7c1964dd686f05e6b4a2b26b2e..59c12e24e8bf87be0c52716445d95911368335b5 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "MSP430.h"
 #include "MCTargetDesc/MSP430MCTargetDesc.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCFixedLenDisassembler.h"
index 76eb03988a59e97fd59c40a79a3a08ad38f41099..da928733015f0318f563b476ae6bdb8942a939cf 100644 (file)
@@ -13,6 +13,7 @@
 #include "MSP430MCTargetDesc.h"
 #include "MSP430InstPrinter.h"
 #include "MSP430MCAsmInfo.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
index d5af8075c177642e29b8b1a509bc906d136106db..02bfbe40c6bfaf0c652a9c005f5bd4f031b70d71 100644 (file)
@@ -29,8 +29,6 @@ class MCObjectTargetWriter;
 class MCStreamer;
 class MCTargetStreamer;
 
-Target &getTheMSP430Target();
-
 /// Creates a machine code emitter for MSP430.
 MCCodeEmitter *createMSP430MCCodeEmitter(const MCInstrInfo &MCII,
                                          const MCRegisterInfo &MRI,
index 786ff5f852566005e92524fd9338c03e11e36817..3a71a084d1afb778a074bb711a76f2c8b16159b7 100644 (file)
@@ -16,6 +16,7 @@
 #include "MSP430InstrInfo.h"
 #include "MSP430MCInstLower.h"
 #include "MSP430TargetMachine.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 #include "llvm/BinaryFormat/ELF.h"
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/MachineConstantPool.h"
index 757dab2f59eff3374b9b424abcca22fa3b3886ef..8c4ca982c96625ca820d849b99271dd4136b4ad7 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "MSP430TargetMachine.h"
 #include "MSP430.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
 #include "llvm/CodeGen/TargetPassConfig.h"
index 045a8b9a50fbbd1821a9e0537d3a8caeddc9f988..5da7d588079f1f16d8b3f72e6b88f4a4aa582a3a 100644 (file)
@@ -6,8 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MSP430.h"
-#include "llvm/IR/Module.h"
+#include "TargetInfo/MSP430TargetInfo.h"
 #include "llvm/Support/TargetRegistry.h"
 using namespace llvm;
 
diff --git a/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.h b/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.h
new file mode 100644 (file)
index 0000000..1785424
--- /dev/null
@@ -0,0 +1,20 @@
+//===-- MSP430TargetInfo.h - MSP430 Target Implementation -------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIB_TARGET_MSP430_TARGETINFO_MSP430TARGETINFO_H
+#define LLVM_LIB_TARGET_MSP430_TARGETINFO_MSP430TARGETINFO_H
+
+namespace llvm {
+
+class Target;
+
+Target &getTheMSP430Target();
+
+} // namespace llvm
+
+#endif // LLVM_LIB_TARGET_MSP430_TARGETINFO_MSP430TARGETINFO_H