]> granicus.if.org Git - llvm/commitdiff
[AVR] Create a TargetInfo header. NFC
authorRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 22:41:58 +0000 (22:41 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 14 May 2019 22:41:58 +0000 (22:41 +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@360721 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AVR/AVRAsmPrinter.cpp
lib/Target/AVR/AVRTargetMachine.cpp
lib/Target/AVR/AsmParser/AVRAsmParser.cpp
lib/Target/AVR/Disassembler/AVRDisassembler.cpp
lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.h
lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp
lib/Target/AVR/TargetInfo/AVRTargetInfo.h [new file with mode: 0644]

index 33f47576464a4665e0c4d0548876cbaf5518f5be..7586bd7b78fc44b3d527015e11eef08772eac067 100644 (file)
@@ -15,6 +15,7 @@
 #include "AVRMCInstLower.h"
 #include "AVRSubtarget.h"
 #include "MCTargetDesc/AVRInstPrinter.h"
+#include "TargetInfo/AVRTargetInfo.h"
 
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/MachineFunction.h"
index fa1a117311f4f9f0ca3a19a018839665d48294e7..a36c8b0f964935f0e732081e244750fbbe76ebe6 100644 (file)
@@ -21,6 +21,7 @@
 #include "AVR.h"
 #include "AVRTargetObjectFile.h"
 #include "MCTargetDesc/AVRMCTargetDesc.h"
+#include "TargetInfo/AVRTargetInfo.h"
 
 namespace llvm {
 
index d667b6800b37a0a7b11f489956121db9ff77ed18..aac5644711e2157f93734013dcd399aa632229df 100644 (file)
@@ -11,6 +11,7 @@
 #include "MCTargetDesc/AVRMCELFStreamer.h"
 #include "MCTargetDesc/AVRMCExpr.h"
 #include "MCTargetDesc/AVRMCTargetDesc.h"
+#include "TargetInfo/AVRTargetInfo.h"
 
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/StringSwitch.h"
index ca554056f070d06735b8b30b6e5467db285178d7..e203a5069c85b2ce70ff5fadbc405c3fff71a9ca 100644 (file)
@@ -14,6 +14,7 @@
 #include "AVRRegisterInfo.h"
 #include "AVRSubtarget.h"
 #include "MCTargetDesc/AVRMCTargetDesc.h"
+#include "TargetInfo/AVRTargetInfo.h"
 
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
index 47726dff607a1cf932494bd9589059d7f050050f..f6607b26a065b5e527b221151623c38a985baa96 100644 (file)
@@ -16,6 +16,7 @@
 #include "AVRMCELFStreamer.h"
 #include "AVRMCTargetDesc.h"
 #include "AVRTargetStreamer.h"
+#include "TargetInfo/AVRTargetInfo.h"
 
 #include "llvm/MC/MCAsmBackend.h"
 #include "llvm/MC/MCELFStreamer.h"
index 54f7c003ae79dc04e31ab0de39083c5b5a640665..470db01ff46895bfe7490b723404ee34edfd076a 100644 (file)
@@ -32,8 +32,6 @@ class Target;
 class Triple;
 class raw_pwrite_stream;
 
-Target &getTheAVRTarget();
-
 MCInstrInfo *createAVRMCInstrInfo();
 
 /// Creates a machine code emitter for AVR.
index cb196e35fc623b3aa0f1ca9511afa22f3352f8c7..c62d5cb85bc4bfe20b768683af34697ad0ec1162 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/IR/Module.h"
+#include "TargetInfo/AVRTargetInfo.h"
 #include "llvm/Support/TargetRegistry.h"
 namespace llvm {
 Target &getTheAVRTarget() {
diff --git a/lib/Target/AVR/TargetInfo/AVRTargetInfo.h b/lib/Target/AVR/TargetInfo/AVRTargetInfo.h
new file mode 100644 (file)
index 0000000..7e0186b
--- /dev/null
@@ -0,0 +1,18 @@
+//===-- AVRTargetInfo.h - AVR 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_AVR_TARGET_INFO_H
+#define LLVM_AVR_TARGET_INFO_H
+
+namespace llvm {
+class Target;
+
+Target &getTheAVRTarget();
+} // namespace llvm
+
+#endif // LLVM_AVR_TARGET_INFO_H