mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-28 22:00:30 +00:00
[Lanai] 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: 360726
This commit is contained in:
parent
c79810532e
commit
9d093a2a79
@ -10,6 +10,7 @@
|
||||
#include "LanaiAluCode.h"
|
||||
#include "LanaiCondCode.h"
|
||||
#include "MCTargetDesc/LanaiMCExpr.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "Lanai.h"
|
||||
#include "LanaiSubtarget.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/MC/MCFixedLenDisassembler.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
|
@ -44,7 +44,6 @@ FunctionPass *createLanaiMemAluCombinerPass();
|
||||
// operations.
|
||||
FunctionPass *createLanaiSetflagAluCombinerPass();
|
||||
|
||||
Target &getTheLanaiTarget();
|
||||
} // namespace llvm
|
||||
|
||||
#endif // LLVM_LIB_TARGET_LANAI_LANAI_H
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "LanaiInstrInfo.h"
|
||||
#include "LanaiMCInstLower.h"
|
||||
#include "LanaiTargetMachine.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/CodeGen/AsmPrinter.h"
|
||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "Lanai.h"
|
||||
#include "LanaiTargetObjectFile.h"
|
||||
#include "LanaiTargetTransformInfo.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "LanaiMCTargetDesc.h"
|
||||
#include "LanaiInstPrinter.h"
|
||||
#include "LanaiMCAsmInfo.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
|
@ -31,8 +31,6 @@ class Triple;
|
||||
class StringRef;
|
||||
class raw_pwrite_stream;
|
||||
|
||||
Target &getTheLanaiTarget();
|
||||
|
||||
MCCodeEmitter *createLanaiMCCodeEmitter(const MCInstrInfo &MCII,
|
||||
const MCRegisterInfo &MRI,
|
||||
MCContext &Ctx);
|
||||
|
@ -6,17 +6,15 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "TargetInfo/LanaiTargetInfo.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
Target &getTheLanaiTarget() {
|
||||
Target &llvm::getTheLanaiTarget() {
|
||||
static Target TheLanaiTarget;
|
||||
return TheLanaiTarget;
|
||||
}
|
||||
} // namespace llvm
|
||||
|
||||
extern "C" void LLVMInitializeLanaiTargetInfo() {
|
||||
RegisterTarget<Triple::lanai> X(getTheLanaiTarget(), "lanai", "Lanai",
|
||||
|
20
lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h
Normal file
20
lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h
Normal file
@ -0,0 +1,20 @@
|
||||
//===-- LanaiTargetInfo.h - Lanai 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_LANAI_TARGETINFO_LANAITARGETINFO_H
|
||||
#define LLVM_LIB_TARGET_LANAI_TARGETINFO_LANAITARGETINFO_H
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Target;
|
||||
|
||||
Target &getTheLanaiTarget();
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
#endif // LLVM_LIB_TARGET_LANAI_TARGETINFO_LANAITARGETINFO_H
|
Loading…
Reference in New Issue
Block a user