Skip to content

Commit d881626

Browse files
kaz7Simon Moll
authored andcommitted
[VE] Create a TargetInfo header. NFC
Summary: Move the declarations of getThe<Name>Target() functions into a new header in TargetInfo and make users of these functions include this new header in order to follow other architectures. Differential Revision: https://reviews.llvm.org/D78543
1 parent 6b3168f commit d881626

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "VEMCTargetDesc.h"
14+
#include "TargetInfo/VETargetInfo.h"
1415
#include "VEInstPrinter.h"
1516
#include "VEMCAsmInfo.h"
1617
#include "VETargetStreamer.h"

llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ class Triple;
3131
class StringRef;
3232
class raw_pwrite_stream;
3333
class raw_ostream;
34-
35-
Target &getTheVETarget();
36-
3734
} // namespace llvm
3835

3936
// Defines symbolic names for VE registers. This defines a mapping from

llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "VE.h"
10-
#include "llvm/IR/Module.h"
9+
#include "TargetInfo/VETargetInfo.h"
1110
#include "llvm/Support/TargetRegistry.h"
1211

1312
using namespace llvm;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- VETargetInfo.h - VE Target Implementation ---------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIB_TARGET_VE_TARGETINFO_VETARGETINFO_H
10+
#define LLVM_LIB_TARGET_VE_TARGETINFO_VETARGETINFO_H
11+
12+
namespace llvm {
13+
14+
class Target;
15+
16+
Target &getTheVETarget();
17+
18+
} // namespace llvm
19+
20+
#endif // LLVM_LIB_TARGET_VE_TARGETINFO_VETARGETINFO_H

llvm/lib/Target/VE/VEAsmPrinter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "MCTargetDesc/VEInstPrinter.h"
1515
#include "MCTargetDesc/VEMCExpr.h"
1616
#include "MCTargetDesc/VETargetStreamer.h"
17+
#include "TargetInfo/VETargetInfo.h"
1718
#include "VE.h"
1819
#include "VEInstrInfo.h"
1920
#include "VETargetMachine.h"

llvm/lib/Target/VE/VETargetMachine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//===----------------------------------------------------------------------===//
1111

1212
#include "VETargetMachine.h"
13+
#include "TargetInfo/VETargetInfo.h"
1314
#include "VE.h"
1415
#include "VETargetTransformInfo.h"
1516
#include "llvm/CodeGen/Passes.h"

0 commit comments

Comments
 (0)