[AVR] Create a TargetInfo header. NFC

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: 360721
This commit is contained in:
Richard Trieu 2019-05-14 22:41:58 +00:00
parent 048a97bca4
commit e982b42003
8 changed files with 24 additions and 3 deletions

View 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"

View File

@ -21,6 +21,7 @@
#include "AVR.h"
#include "AVRTargetObjectFile.h"
#include "MCTargetDesc/AVRMCTargetDesc.h"
#include "TargetInfo/AVRTargetInfo.h"
namespace llvm {

View 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"

View 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"

View 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"

View File

@ -32,8 +32,6 @@ class Target;
class Triple;
class raw_pwrite_stream;
Target &getTheAVRTarget();
MCInstrInfo *createAVRMCInstrInfo();
/// Creates a machine code emitter for AVR.

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/IR/Module.h"
#include "TargetInfo/AVRTargetInfo.h"
#include "llvm/Support/TargetRegistry.h"
namespace llvm {
Target &getTheAVRTarget() {

View File

@ -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