[Sparc] Move InstPrinter files to MCTargetDesc. NFC
authorRichard Trieu <rtrieu@google.com>
Sat, 11 May 2019 02:59:02 +0000 (02:59 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 11 May 2019 02:59:02 +0000 (02:59 +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.

llvm-svn: 360506

llvm/lib/Target/Sparc/CMakeLists.txt
llvm/lib/Target/Sparc/InstPrinter/CMakeLists.txt [deleted file]
llvm/lib/Target/Sparc/InstPrinter/LLVMBuild.txt [deleted file]
llvm/lib/Target/Sparc/LLVMBuild.txt
llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt
llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp [moved from llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp with 100% similarity]
llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.h [moved from llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h with 94% similarity]
llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp
llvm/lib/Target/Sparc/SparcAsmPrinter.cpp

index e60fd4a..e94dc5b 100644 (file)
@@ -30,6 +30,5 @@ add_llvm_target(SparcCodeGen
 
 add_subdirectory(AsmParser)
 add_subdirectory(Disassembler)
-add_subdirectory(InstPrinter)
 add_subdirectory(MCTargetDesc)
 add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/Sparc/InstPrinter/CMakeLists.txt b/llvm/lib/Target/Sparc/InstPrinter/CMakeLists.txt
deleted file mode 100644 (file)
index a285a83..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_library(LLVMSparcAsmPrinter
-  SparcInstPrinter.cpp
-  )
diff --git a/llvm/lib/Target/Sparc/InstPrinter/LLVMBuild.txt b/llvm/lib/Target/Sparc/InstPrinter/LLVMBuild.txt
deleted file mode 100644 (file)
index cb40190..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/Sparc/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 = SparcAsmPrinter
-parent = Sparc
-required_libraries = MC Support
-add_to_library_groups = Sparc
index b13d844..b9db8e6 100644 (file)
@@ -15,7 +15,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo
+subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo
 
 [component_0]
 type = TargetGroup
@@ -30,6 +30,6 @@ has_jit = 1
 type = Library
 name = SparcCodeGen
 parent = Sparc
-required_libraries = AsmPrinter CodeGen Core MC SelectionDAG SparcAsmPrinter
+required_libraries = AsmPrinter CodeGen Core MC SelectionDAG
                      SparcDesc SparcInfo Support Target
 add_to_library_groups = Sparc
index c4dcdb5..037099d 100644 (file)
@@ -1,6 +1,7 @@
 add_llvm_library(LLVMSparcDesc
   SparcAsmBackend.cpp
   SparcELFObjectWriter.cpp
+  SparcInstPrinter.cpp
   SparcMCAsmInfo.cpp
   SparcMCCodeEmitter.cpp
   SparcMCTargetDesc.cpp
index 249a195..1bb8812 100644 (file)
@@ -18,5 +18,5 @@
 type = Library
 name = SparcDesc
 parent = Sparc
-required_libraries = MC SparcAsmPrinter SparcInfo Support
+required_libraries = MC SparcInfo Support
 add_to_library_groups = Sparc
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_SPARC_INSTPRINTER_SPARCINSTPRINTER_H
-#define LLVM_LIB_TARGET_SPARC_INSTPRINTER_SPARCINSTPRINTER_H
+#ifndef LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCINSTPRINTER_H
+#define LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCINSTPRINTER_H
 
 #include "llvm/MC/MCInstPrinter.h"
 
index 18d5108..c62bfbf 100644 (file)
@@ -11,7 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SparcMCTargetDesc.h"
-#include "InstPrinter/SparcInstPrinter.h"
+#include "SparcInstPrinter.h"
 #include "SparcMCAsmInfo.h"
 #include "SparcTargetStreamer.h"
 #include "llvm/MC/MCInstrInfo.h"
index c5ed7f2..a322d49 100644 (file)
@@ -11,7 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SparcTargetStreamer.h"
-#include "InstPrinter/SparcInstPrinter.h"
+#include "SparcInstPrinter.h"
 #include "llvm/Support/FormattedStream.h"
 
 using namespace llvm;
index 7e811c2..52305a1 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "InstPrinter/SparcInstPrinter.h"
+#include "MCTargetDesc/SparcInstPrinter.h"
 #include "MCTargetDesc/SparcMCExpr.h"
 #include "MCTargetDesc/SparcTargetStreamer.h"
 #include "Sparc.h"