From: Richard Trieu Date: Sat, 11 May 2019 01:03:03 +0000 (+0000) Subject: [AVR] Move InstPrinter files to MCTargetDesc. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2edebed8417c7b1f5f9b03d7f60bf46daf68fe49;p=llvm [AVR] Move InstPrinter files to MCTargetDesc. NFC 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@360493 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AVR/AVRAsmPrinter.cpp b/lib/Target/AVR/AVRAsmPrinter.cpp index d885050d5bf..33f47576464 100644 --- a/lib/Target/AVR/AVRAsmPrinter.cpp +++ b/lib/Target/AVR/AVRAsmPrinter.cpp @@ -14,7 +14,7 @@ #include "AVR.h" #include "AVRMCInstLower.h" #include "AVRSubtarget.h" -#include "InstPrinter/AVRInstPrinter.h" +#include "MCTargetDesc/AVRInstPrinter.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineFunction.h" diff --git a/lib/Target/AVR/CMakeLists.txt b/lib/Target/AVR/CMakeLists.txt index 40ce548bff2..e7a44acdaac 100644 --- a/lib/Target/AVR/CMakeLists.txt +++ b/lib/Target/AVR/CMakeLists.txt @@ -32,6 +32,5 @@ add_llvm_target(AVRCodeGen add_subdirectory(AsmParser) add_subdirectory(Disassembler) -add_subdirectory(InstPrinter) add_subdirectory(MCTargetDesc) add_subdirectory(TargetInfo) diff --git a/lib/Target/AVR/InstPrinter/CMakeLists.txt b/lib/Target/AVR/InstPrinter/CMakeLists.txt deleted file mode 100644 index 0f3539a7d5e..00000000000 --- a/lib/Target/AVR/InstPrinter/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/.. ) - -add_llvm_library(LLVMAVRAsmPrinter - AVRInstPrinter.cpp - ) - -add_dependencies(LLVMAVRAsmPrinter AVRCommonTableGen) \ No newline at end of file diff --git a/lib/Target/AVR/InstPrinter/LLVMBuild.txt b/lib/Target/AVR/InstPrinter/LLVMBuild.txt deleted file mode 100644 index 67203ff9bb3..00000000000 --- a/lib/Target/AVR/InstPrinter/LLVMBuild.txt +++ /dev/null @@ -1,22 +0,0 @@ -;===- ./lib/Target/AVR/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 = AVRAsmPrinter -parent = AVR -required_libraries = MC Support -add_to_library_groups = AVR \ No newline at end of file diff --git a/lib/Target/AVR/LLVMBuild.txt b/lib/Target/AVR/LLVMBuild.txt index 359ac1ae4b9..d488c9ea94b 100644 --- a/lib/Target/AVR/LLVMBuild.txt +++ b/lib/Target/AVR/LLVMBuild.txt @@ -15,7 +15,7 @@ ;===------------------------------------------------------------------------===; [common] -subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo +subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo [component_0] type = TargetGroup @@ -29,6 +29,6 @@ has_disassembler = 1 type = Library name = AVRCodeGen parent = AVR -required_libraries = AsmPrinter CodeGen Core MC AVRAsmPrinter AVRDesc AVRInfo SelectionDAG Support Target +required_libraries = AsmPrinter CodeGen Core MC AVRDesc AVRInfo SelectionDAG Support Target add_to_library_groups = AVR diff --git a/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp b/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp similarity index 100% rename from lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp rename to lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp diff --git a/lib/Target/AVR/InstPrinter/AVRInstPrinter.h b/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h similarity index 100% rename from lib/Target/AVR/InstPrinter/AVRInstPrinter.h rename to lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h diff --git a/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp b/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp index 9791bce0c29..47726dff607 100644 --- a/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp +++ b/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp @@ -11,11 +11,11 @@ //===----------------------------------------------------------------------===// #include "AVRELFStreamer.h" +#include "AVRInstPrinter.h" #include "AVRMCAsmInfo.h" #include "AVRMCELFStreamer.h" #include "AVRMCTargetDesc.h" #include "AVRTargetStreamer.h" -#include "InstPrinter/AVRInstPrinter.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCELFStreamer.h" diff --git a/lib/Target/AVR/MCTargetDesc/CMakeLists.txt b/lib/Target/AVR/MCTargetDesc/CMakeLists.txt index eb7fe956cf3..04a5bbc6c4e 100644 --- a/lib/Target/AVR/MCTargetDesc/CMakeLists.txt +++ b/lib/Target/AVR/MCTargetDesc/CMakeLists.txt @@ -2,6 +2,7 @@ add_llvm_library(LLVMAVRDesc AVRAsmBackend.cpp AVRELFObjectWriter.cpp AVRELFStreamer.cpp + AVRInstPrinter.cpp AVRMCAsmInfo.cpp AVRMCCodeEmitter.cpp AVRMCELFStreamer.cpp diff --git a/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt b/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt index b62e615ef7d..45460e5f240 100644 --- a/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt +++ b/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt @@ -18,5 +18,5 @@ type = Library name = AVRDesc parent = AVR -required_libraries = MC AVRAsmPrinter AVRInfo Support +required_libraries = MC AVRInfo Support add_to_library_groups = AVR