Skip to content

Commit

Permalink
[SystemZ] Create a TargetInfo header. NFC
Browse files Browse the repository at this point in the history
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@360734 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Weverything committed May 15, 2019
1 parent eb0029f commit ca462ef
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "MCTargetDesc/SystemZInstPrinter.h"
#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
Expand Down
1 change: 1 addition & 0 deletions lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "SystemZ.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
Expand Down
1 change: 1 addition & 0 deletions lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "SystemZMCTargetDesc.h"
#include "SystemZInstPrinter.h"
#include "SystemZMCAsmInfo.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
Expand Down
2 changes: 0 additions & 2 deletions lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class Triple;
class raw_pwrite_stream;
class raw_ostream;

Target &getTheSystemZTarget();

namespace SystemZMC {
// How many bytes are in the ABI-defined, caller-allocated part of
// a stack frame.
Expand Down
1 change: 1 addition & 0 deletions lib/Target/SystemZ/SystemZAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "MCTargetDesc/SystemZInstPrinter.h"
#include "SystemZConstantPoolValue.h"
#include "SystemZMCInstLower.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/Mangler.h"
Expand Down
1 change: 1 addition & 0 deletions lib/Target/SystemZ/SystemZTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "SystemZ.h"
#include "SystemZMachineScheduler.h"
#include "SystemZTargetTransformInfo.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "SystemZ.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/Support/TargetRegistry.h"

using namespace llvm;
Expand Down
20 changes: 20 additions & 0 deletions lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- SystemZTargetInfo.h - SystemZ 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_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H
#define LLVM_LIB_TARGET_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H

namespace llvm {

class Target;

Target &getTheSystemZTarget();

} // namespace llvm

#endif // LLVM_LIB_TARGET_SYSTEMZ_TARGETINFO_SYSTEMZTARGETINFO_H

0 comments on commit ca462ef

Please sign in to comment.