[PATCH] D78543: [VE] Create a TargetInfo header. NFC

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 01:35:20 PDT 2020


kaz7 created this revision.
kaz7 added projects: LLVM, VE.
kaz7 added reviewers: simoll, k-ishizaka.
Herald added subscribers: llvm-commits, hiraditya.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78543

Files:
  llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
  llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
  llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp
  llvm/lib/Target/VE/TargetInfo/VETargetInfo.h
  llvm/lib/Target/VE/VEAsmPrinter.cpp
  llvm/lib/Target/VE/VETargetMachine.cpp


Index: llvm/lib/Target/VE/VETargetMachine.cpp
===================================================================
--- llvm/lib/Target/VE/VETargetMachine.cpp
+++ llvm/lib/Target/VE/VETargetMachine.cpp
@@ -10,6 +10,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "VETargetMachine.h"
+#include "TargetInfo/VETargetInfo.h"
 #include "VE.h"
 #include "VETargetTransformInfo.h"
 #include "llvm/CodeGen/Passes.h"
Index: llvm/lib/Target/VE/VEAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/VE/VEAsmPrinter.cpp
+++ llvm/lib/Target/VE/VEAsmPrinter.cpp
@@ -14,6 +14,7 @@
 #include "MCTargetDesc/VEInstPrinter.h"
 #include "MCTargetDesc/VEMCExpr.h"
 #include "MCTargetDesc/VETargetStreamer.h"
+#include "TargetInfo/VETargetInfo.h"
 #include "VE.h"
 #include "VEInstrInfo.h"
 #include "VETargetMachine.h"
Index: llvm/lib/Target/VE/TargetInfo/VETargetInfo.h
===================================================================
--- /dev/null
+++ llvm/lib/Target/VE/TargetInfo/VETargetInfo.h
@@ -0,0 +1,20 @@
+//===-- VETargetInfo.h - VE 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_VE_TARGETINFO_VETARGETINFO_H
+#define LLVM_LIB_TARGET_VE_TARGETINFO_VETARGETINFO_H
+
+namespace llvm {
+
+class Target;
+
+Target &getTheVETarget();
+
+} // namespace llvm
+
+#endif // LLVM_LIB_TARGET_VE_TARGETINFO_VETARGETINFO_H
Index: llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp
===================================================================
--- llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp
+++ llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp
@@ -6,8 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "VE.h"
-#include "llvm/IR/Module.h"
+#include "TargetInfo/VETargetInfo.h"
 #include "llvm/Support/TargetRegistry.h"
 
 using namespace llvm;
Index: llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
===================================================================
--- llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
+++ llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
@@ -31,9 +31,6 @@
 class StringRef;
 class raw_pwrite_stream;
 class raw_ostream;
-
-Target &getTheVETarget();
-
 } // namespace llvm
 
 // Defines symbolic names for VE registers.  This defines a mapping from
Index: llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
===================================================================
--- llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
+++ llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
@@ -11,6 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "VEMCTargetDesc.h"
+#include "TargetInfo/VETargetInfo.h"
 #include "VEInstPrinter.h"
 #include "VEMCAsmInfo.h"
 #include "VETargetStreamer.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78543.258919.patch
Type: text/x-patch
Size: 3140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200421/0bc1c3aa/attachment-0001.bin>


More information about the llvm-commits mailing list