[X86] 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: 360736
This commit is contained in:
Richard Trieu 2019-05-15 01:17:58 +00:00
parent 89c92a9d9d
commit 6446b111ab
8 changed files with 27 additions and 4 deletions

View File

@ -10,6 +10,7 @@
#include "MCTargetDesc/X86IntelInstPrinter.h"
#include "MCTargetDesc/X86MCExpr.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86AsmParserCommon.h"
#include "X86Operand.h"
#include "llvm/ADT/STLExtras.h"

View File

@ -75,6 +75,7 @@
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86MCTargetDesc.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86DisassemblerDecoder.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"

View File

@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "X86MCTargetDesc.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86ATTInstPrinter.h"
#include "X86BaseInfo.h"
#include "X86IntelInstPrinter.h"

View File

@ -34,9 +34,6 @@ class StringRef;
class raw_ostream;
class raw_pwrite_stream;
Target &getTheX86_32Target();
Target &getTheX86_64Target();
/// Flavour of dwarf regnumbers
///
namespace DWARFFlavour {

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
#include "MCTargetDesc/X86MCTargetDesc.h"
#include "TargetInfo/X86TargetInfo.h"
#include "llvm/Support/TargetRegistry.h"
using namespace llvm;

View File

@ -0,0 +1,21 @@
//===-- X86TargetInfo.h - X86 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_X86_TARGETINFO_X86TARGETINFO_H
#define LLVM_LIB_TARGET_X86_TARGETINFO_X86TARGETINFO_H
namespace llvm {
class Target;
Target &getTheX86_32Target();
Target &getTheX86_64Target();
}
#endif // LLVM_LIB_TARGET_X86_TARGETINFO_X86TARGETINFO_H

View File

@ -15,6 +15,7 @@
#include "MCTargetDesc/X86ATTInstPrinter.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
#include "llvm/BinaryFormat/COFF.h"

View File

@ -12,6 +12,7 @@
#include "X86TargetMachine.h"
#include "MCTargetDesc/X86MCTargetDesc.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86.h"
#include "X86CallLowering.h"
#include "X86LegalizerInfo.h"