[AArch64] 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: 360709
This commit is contained in:
parent
9b234b388d
commit
b26592e04d
|
@ -22,6 +22,7 @@
|
|||
#include "MCTargetDesc/AArch64MCExpr.h"
|
||||
#include "MCTargetDesc/AArch64MCTargetDesc.h"
|
||||
#include "MCTargetDesc/AArch64TargetStreamer.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "Utils/AArch64BaseInfo.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "AArch64TargetObjectFile.h"
|
||||
#include "AArch64TargetTransformInfo.h"
|
||||
#include "MCTargetDesc/AArch64MCTargetDesc.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "MCTargetDesc/AArch64MCExpr.h"
|
||||
#include "MCTargetDesc/AArch64MCTargetDesc.h"
|
||||
#include "MCTargetDesc/AArch64TargetStreamer.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "AArch64InstrInfo.h"
|
||||
#include "Utils/AArch64BaseInfo.h"
|
||||
#include "llvm/ADT/APFloat.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "AArch64ExternalSymbolizer.h"
|
||||
#include "MCTargetDesc/AArch64AddressingModes.h"
|
||||
#include "MCTargetDesc/AArch64MCTargetDesc.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "Utils/AArch64BaseInfo.h"
|
||||
#include "llvm-c/Disassembler.h"
|
||||
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "AArch64WinCOFFStreamer.h"
|
||||
#include "MCTargetDesc/AArch64AddressingModes.h"
|
||||
#include "MCTargetDesc/AArch64InstPrinter.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "llvm/MC/MCAsmBackend.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCInstrAnalysis.h"
|
||||
|
|
|
@ -36,12 +36,6 @@ class Triple;
|
|||
class raw_ostream;
|
||||
class raw_pwrite_stream;
|
||||
|
||||
Target &getTheAArch64leTarget();
|
||||
Target &getTheAArch64beTarget();
|
||||
Target &getTheAArch64_32Target();
|
||||
Target &getTheARM64Target();
|
||||
Target &getTheARM64_32Target();
|
||||
|
||||
MCCodeEmitter *createAArch64MCCodeEmitter(const MCInstrInfo &MCII,
|
||||
const MCRegisterInfo &MRI,
|
||||
MCContext &Ctx);
|
||||
|
|
|
@ -6,31 +6,30 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "TargetInfo/AArch64TargetInfo.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
|
||||
using namespace llvm;
|
||||
namespace llvm {
|
||||
Target &getTheAArch64leTarget() {
|
||||
Target &llvm::getTheAArch64leTarget() {
|
||||
static Target TheAArch64leTarget;
|
||||
return TheAArch64leTarget;
|
||||
}
|
||||
Target &getTheAArch64beTarget() {
|
||||
Target &llvm::getTheAArch64beTarget() {
|
||||
static Target TheAArch64beTarget;
|
||||
return TheAArch64beTarget;
|
||||
}
|
||||
Target &getTheAArch64_32Target() {
|
||||
Target &llvm::getTheAArch64_32Target() {
|
||||
static Target TheAArch64leTarget;
|
||||
return TheAArch64leTarget;
|
||||
}
|
||||
Target &getTheARM64Target() {
|
||||
Target &llvm::getTheARM64Target() {
|
||||
static Target TheARM64Target;
|
||||
return TheARM64Target;
|
||||
}
|
||||
Target &getTheARM64_32Target() {
|
||||
Target &llvm::getTheARM64_32Target() {
|
||||
static Target TheARM64_32Target;
|
||||
return TheARM64_32Target;
|
||||
}
|
||||
} // namespace llvm
|
||||
|
||||
extern "C" void LLVMInitializeAArch64TargetInfo() {
|
||||
// Now register the "arm64" name for use with "-march". We don't want it to
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
//===-- AArch64TargetInfo.h - AArch64 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_AARCH64_TARGETINFO_AARCH64TARGETINFO_H
|
||||
#define LLVM_LIB_TARGET_AARCH64_TARGETINFO_AARCH64TARGETINFO_H
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Target;
|
||||
|
||||
Target &getTheAArch64leTarget();
|
||||
Target &getTheAArch64beTarget();
|
||||
Target &getTheAArch64_32Target();
|
||||
Target &getTheARM64Target();
|
||||
Target &getTheARM64_32Target();
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
#endif // LLVM_LIB_TARGET_AARCH64_TARGETINFO_AARCH64TARGETINFO_H
|
Loading…
Reference in New Issue