]> granicus.if.org Git - llvm/commitdiff
[SystemZ] Create a TargetInfo header. NFC
authorRichard Trieu <rtrieu@google.com>
Wed, 15 May 2019 00:46:18 +0000 (00:46 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 15 May 2019 00:46:18 +0000 (00:46 +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@360734 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h
lib/Target/SystemZ/SystemZAsmPrinter.cpp
lib/Target/SystemZ/SystemZTargetMachine.cpp
lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.h [new file with mode: 0644]

index 36c9e6aa6dbee7b431831025b57a56cbf069559d..a259ba3433d6c434f1e04998722232fb522680cf 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "MCTargetDesc/SystemZInstPrinter.h"
 #include "MCTargetDesc/SystemZMCTargetDesc.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
index 7b50b9ce807207e59bdc00421e857825fc54927e..70c26db33ced2a995d34ef7cb5775be5d29d6d11 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "MCTargetDesc/SystemZMCTargetDesc.h"
 #include "SystemZ.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCFixedLenDisassembler.h"
 #include "llvm/MC/MCInst.h"
index ba5767a8dc4751069ebd70c11ce0293481ae1948..3c0300cfd8f0165217fefcbdf42dfd71ed5c300f 100644 (file)
@@ -9,6 +9,7 @@
 #include "SystemZMCTargetDesc.h"
 #include "SystemZInstPrinter.h"
 #include "SystemZMCAsmInfo.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/MC/MCDwarf.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
index 53fa358293355447fbcb250e69705440d5e0875a..8f720c5abb3408f27ec8098d3b6be02462b687ec 100644 (file)
@@ -29,8 +29,6 @@ class Triple;
 class raw_pwrite_stream;
 class raw_ostream;
 
-Target &getTheSystemZTarget();
-
 namespace SystemZMC {
 // How many bytes are in the ABI-defined, caller-allocated part of
 // a stack frame.
index d37310cfea7a93fa3eed5b9f28bb174646ede073..f3d7d3e1fd1a6721fb6d852d7461c0b094bc71a4 100644 (file)
@@ -15,6 +15,7 @@
 #include "MCTargetDesc/SystemZInstPrinter.h"
 #include "SystemZConstantPoolValue.h"
 #include "SystemZMCInstLower.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/CodeGen/MachineModuleInfoImpls.h"
 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
 #include "llvm/IR/Mangler.h"
index 10ca9b649ecc2d50d0e2f3a4d27a34c4de58b833..f3ec32a68effb469cdce7dea1cdf2f9ce5d3759d 100644 (file)
@@ -11,6 +11,7 @@
 #include "SystemZ.h"
 #include "SystemZMachineScheduler.h"
 #include "SystemZTargetTransformInfo.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
index 07093dcf9f30148f9e0400a98f3d077cc695d3f4..713a55ee8400dec4b44cd74f4402c2e5c543e956 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "SystemZ.h"
+#include "TargetInfo/SystemZTargetInfo.h"
 #include "llvm/Support/TargetRegistry.h"
 
 using namespace llvm;
diff --git a/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.h b/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.h
new file mode 100644 (file)
index 0000000..cad141c
--- /dev/null
@@ -0,0 +1,20 @@
+//===-- SystemZTargetInfo.h - SystemZ 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_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H
+#define LLVM_LIB_TARGET_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H
+
+namespace llvm {
+
+class Target;
+
+Target &getTheSystemZTarget();
+
+} // namespace llvm
+
+#endif // LLVM_LIB_TARGET_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H