OSDN Git Service

[RISCV] Move InstPrinter files to MCTargetDesc. NFC
authorRichard Trieu <rtrieu@google.com>
Sat, 11 May 2019 02:43:58 +0000 (02:43 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 11 May 2019 02:43:58 +0000 (02:43 +0000)
For some targets, there is a circular dependency between InstPrinter and
MCTargetDesc.  Merging them together will fix this.  For the other targets,
the merging is to maintain consistency so all targets will have the same
structure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360505 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/RISCV/CMakeLists.txt
lib/Target/RISCV/InstPrinter/CMakeLists.txt [deleted file]
lib/Target/RISCV/InstPrinter/LLVMBuild.txt [deleted file]
lib/Target/RISCV/LLVMBuild.txt
lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
lib/Target/RISCV/MCTargetDesc/LLVMBuild.txt
lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp [moved from lib/Target/RISCV/InstPrinter/RISCVInstPrinter.cpp with 100% similarity]
lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h [moved from lib/Target/RISCV/InstPrinter/RISCVInstPrinter.h with 94% similarity]
lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
lib/Target/RISCV/RISCVAsmPrinter.cpp

index 07c32cb..131e7c3 100644 (file)
@@ -31,7 +31,6 @@ add_llvm_target(RISCVCodeGen
 
 add_subdirectory(AsmParser)
 add_subdirectory(Disassembler)
-add_subdirectory(InstPrinter)
 add_subdirectory(MCTargetDesc)
 add_subdirectory(TargetInfo)
 add_subdirectory(Utils)
diff --git a/lib/Target/RISCV/InstPrinter/CMakeLists.txt b/lib/Target/RISCV/InstPrinter/CMakeLists.txt
deleted file mode 100644 (file)
index 7f91743..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_library(LLVMRISCVAsmPrinter
-  RISCVInstPrinter.cpp
-  )
diff --git a/lib/Target/RISCV/InstPrinter/LLVMBuild.txt b/lib/Target/RISCV/InstPrinter/LLVMBuild.txt
deleted file mode 100644 (file)
index 874a657..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/RISCV/InstPrinter/LLVMBuild.txt -------------*- Conf -*--===;
-;
-; 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
-;
-;===------------------------------------------------------------------------===;
-;
-; This is an LLVMBuild description file for the components in this subdirectory.
-;
-; For more information on the LLVMBuild system, please see:
-;
-;   http://llvm.org/docs/LLVMBuild.html
-;
-;===------------------------------------------------------------------------===;
-
-[component_0]
-type = Library
-name = RISCVAsmPrinter
-parent = RISCV
-required_libraries = MC RISCVUtils Support
-add_to_library_groups = RISCV
index a4b92d2..44cebb0 100644 (file)
@@ -15,7 +15,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AsmParser Disassembler InstPrinter TargetInfo MCTargetDesc Utils
+subdirectories = AsmParser Disassembler TargetInfo MCTargetDesc Utils
 
 [component_0]
 type = TargetGroup
@@ -29,6 +29,6 @@ has_disassembler = 1
 type = Library
 name = RISCVCodeGen
 parent = RISCV
-required_libraries = AsmPrinter Core CodeGen MC RISCVAsmPrinter RISCVDesc
+required_libraries = AsmPrinter Core CodeGen MC RISCVDesc
   RISCVInfo RISCVUtils SelectionDAG Support Target
 add_to_library_groups = RISCV
index d9f4188..a55d273 100644 (file)
@@ -1,6 +1,7 @@
 add_llvm_library(LLVMRISCVDesc
   RISCVAsmBackend.cpp
   RISCVELFObjectWriter.cpp
+  RISCVInstPrinter.cpp
   RISCVMCAsmInfo.cpp
   RISCVMCCodeEmitter.cpp
   RISCVMCExpr.cpp
index 39458d6..eeb1c45 100644 (file)
@@ -18,5 +18,5 @@
 type = Library
 name = RISCVDesc
 parent = RISCV
-required_libraries = MC RISCVAsmPrinter RISCVInfo RISCVUtils Support
+required_libraries = MC RISCVInfo RISCVUtils Support
 add_to_library_groups = RISCV
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_RISCV_INSTPRINTER_RISCVINSTPRINTER_H
-#define LLVM_LIB_TARGET_RISCV_INSTPRINTER_RISCVINSTPRINTER_H
+#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVINSTPRINTER_H
+#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVINSTPRINTER_H
 
 #include "MCTargetDesc/RISCVMCTargetDesc.h"
 #include "llvm/MC/MCInstPrinter.h"
index 9209aea..df40ae7 100644 (file)
@@ -11,8 +11,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RISCVMCTargetDesc.h"
-#include "InstPrinter/RISCVInstPrinter.h"
 #include "RISCVELFStreamer.h"
+#include "RISCVInstPrinter.h"
 #include "RISCVMCAsmInfo.h"
 #include "RISCVTargetStreamer.h"
 #include "llvm/ADT/STLExtras.h"
index 5b4518d..0bedf67 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "RISCV.h"
-#include "InstPrinter/RISCVInstPrinter.h"
+#include "MCTargetDesc/RISCVInstPrinter.h"
 #include "MCTargetDesc/RISCVMCExpr.h"
 #include "RISCVTargetMachine.h"
 #include "llvm/CodeGen/AsmPrinter.h"