[ARC] Create a TargetInfo header. NFC
authorRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 22:06:04 +0000 (22:06 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 22:06:04 +0000 (22:06 +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.

llvm-svn: 360716

llvm/lib/Target/ARC/ARCAsmPrinter.cpp
llvm/lib/Target/ARC/ARCTargetMachine.cpp
llvm/lib/Target/ARC/Disassembler/ARCDisassembler.cpp
llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp
llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.h
llvm/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp
llvm/lib/Target/ARC/TargetInfo/ARCTargetInfo.h [new file with mode: 0644]

index 668f6ca..d72a500 100644 (file)
@@ -18,6 +18,7 @@
 #include "ARCTargetMachine.h"
 #include "ARCTargetStreamer.h"
 #include "MCTargetDesc/ARCInstPrinter.h"
+#include "TargetInfo/ARCTargetInfo.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/CodeGen/AsmPrinter.h"
index ed88cf7..9fb45d6 100644 (file)
@@ -12,6 +12,7 @@
 #include "ARCTargetMachine.h"
 #include "ARC.h"
 #include "ARCTargetTransformInfo.h"
+#include "TargetInfo/ARCTargetInfo.h"
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
 #include "llvm/CodeGen/TargetPassConfig.h"
index deabeb6..82da186 100644 (file)
@@ -14,6 +14,7 @@
 #include "ARC.h"
 #include "ARCRegisterInfo.h"
 #include "MCTargetDesc/ARCMCTargetDesc.h"
+#include "TargetInfo/ARCTargetInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCFixedLenDisassembler.h"
index 5739866..aa4818c 100644 (file)
@@ -14,6 +14,7 @@
 #include "ARCInstPrinter.h"
 #include "ARCMCAsmInfo.h"
 #include "ARCTargetStreamer.h"
+#include "TargetInfo/ARCTargetInfo.h"
 #include "llvm/MC/MCDwarf.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
index 8d14c71..ab06ce4 100644 (file)
@@ -19,8 +19,6 @@ namespace llvm {
 
 class Target;
 
-Target &getTheARCTarget();
-
 } // end namespace llvm
 
 // Defines symbolic names for ARC registers.  This defines a mapping from
index 8c1ec58..59b9f80 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "ARC.h"
+#include "TargetInfo/ARCTargetInfo.h"
 #include "llvm/Support/TargetRegistry.h"
 
 using namespace llvm;
diff --git a/llvm/lib/Target/ARC/TargetInfo/ARCTargetInfo.h b/llvm/lib/Target/ARC/TargetInfo/ARCTargetInfo.h
new file mode 100644 (file)
index 0000000..6a9d268
--- /dev/null
@@ -0,0 +1,20 @@
+//===- ARCTargetInfo.h - ARC 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_ARC_TARGETINFO_ARCTARGETINFO_H
+#define LLVM_LIB_TARGET_ARC_TARGETINFO_ARCTARGETINFO_H
+
+namespace llvm {
+
+class Target;
+
+Target &getTheARCTarget();
+
+} // namespace llvm
+
+#endif // LLVM_LIB_TARGET_ARC_TARGETINFO_ARCTARGETINFO_H