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

llvm/lib/Target/Lanai/CMakeLists.txt
llvm/lib/Target/Lanai/InstPrinter/CMakeLists.txt [deleted file]
llvm/lib/Target/Lanai/InstPrinter/LLVMBuild.txt [deleted file]
llvm/lib/Target/Lanai/LLVMBuild.txt
llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp
llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Lanai/MCTargetDesc/LLVMBuild.txt
llvm/lib/Target/Lanai/MCTargetDesc/LanaiInstPrinter.cpp [moved from llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp with 99% similarity]
llvm/lib/Target/Lanai/MCTargetDesc/LanaiInstPrinter.h [moved from llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.h with 93% similarity]
llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp

index c3ad807..09347e1 100644 (file)
@@ -31,6 +31,5 @@ add_llvm_target(LanaiCodeGen
 
 add_subdirectory(AsmParser)
 add_subdirectory(Disassembler)
-add_subdirectory(InstPrinter)
 add_subdirectory(MCTargetDesc)
 add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/Lanai/InstPrinter/CMakeLists.txt b/llvm/lib/Target/Lanai/InstPrinter/CMakeLists.txt
deleted file mode 100644 (file)
index 7f76b89..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_library(LLVMLanaiAsmPrinter
-  LanaiInstPrinter.cpp
-  )
diff --git a/llvm/lib/Target/Lanai/InstPrinter/LLVMBuild.txt b/llvm/lib/Target/Lanai/InstPrinter/LLVMBuild.txt
deleted file mode 100644 (file)
index 59c949d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===-- ./lib/Target/Lanai/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 = LanaiAsmPrinter
-parent = Lanai
-required_libraries = MC Support
-add_to_library_groups = Lanai
index 91c55cd..242dc14 100644 (file)
@@ -15,7 +15,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo
+subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo
 
 [component_0]
 type = TargetGroup
@@ -35,7 +35,6 @@ required_libraries =
  LanaiAsmParser
  LanaiDesc
  LanaiInfo
- LanaiAsmPrinter
  MC
  SelectionDAG
  Support
index a7d8e08..15fba3a 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "InstPrinter/LanaiInstPrinter.h"
+#include "MCTargetDesc/LanaiInstPrinter.h"
 #include "Lanai.h"
 #include "LanaiInstrInfo.h"
 #include "LanaiMCInstLower.h"
index 16cde31..2f1a60b 100644 (file)
@@ -1,6 +1,7 @@
 add_llvm_library(LLVMLanaiDesc
   LanaiAsmBackend.cpp
   LanaiELFObjectWriter.cpp
+  LanaiInstPrinter.cpp
   LanaiMCAsmInfo.cpp
   LanaiMCCodeEmitter.cpp
   LanaiMCExpr.cpp
index c705e86..948d293 100644 (file)
@@ -18,5 +18,5 @@
 type = Library
 name = LanaiDesc
 parent = Lanai
-required_libraries = LanaiInfo LanaiAsmPrinter MC MCDisassembler Support
+required_libraries = LanaiInfo MC MCDisassembler Support
 add_to_library_groups = Lanai
@@ -12,7 +12,7 @@
 
 #include "LanaiInstPrinter.h"
 #include "Lanai.h"
-#include "MCTargetDesc/LanaiMCExpr.h"
+#include "LanaiMCExpr.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_LANAI_INSTPRINTER_LANAIINSTPRINTER_H
-#define LLVM_LIB_TARGET_LANAI_INSTPRINTER_LANAIINSTPRINTER_H
+#ifndef LLVM_LIB_TARGET_LANAI_MCTARGETDESC_LANAIINSTPRINTER_H
+#define LLVM_LIB_TARGET_LANAI_MCTARGETDESC_LANAIINSTPRINTER_H
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MCInstPrinter.h"
@@ -62,4 +62,4 @@ private:
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_TARGET_LANAI_INSTPRINTER_LANAIINSTPRINTER_H
+#endif // LLVM_LIB_TARGET_LANAI_MCTARGETDESC_LANAIINSTPRINTER_H
index b647804..cf425cf 100644 (file)
@@ -11,7 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "LanaiMCTargetDesc.h"
-#include "InstPrinter/LanaiInstPrinter.h"
+#include "LanaiInstPrinter.h"
 #include "LanaiMCAsmInfo.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Triple.h"