[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.
llvm-svn: 360493
diff --git a/llvm/lib/Target/AVR/AVRAsmPrinter.cpp b/llvm/lib/Target/AVR/AVRAsmPrinter.cpp
index d885050..33f4757 100644
--- a/llvm/lib/Target/AVR/AVRAsmPrinter.cpp
+++ b/llvm/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/llvm/lib/Target/AVR/CMakeLists.txt b/llvm/lib/Target/AVR/CMakeLists.txt
index 40ce548..e7a44ac 100644
--- a/llvm/lib/Target/AVR/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/CMakeLists.txt
@@ -32,6 +32,5 @@
add_subdirectory(AsmParser)
add_subdirectory(Disassembler)
-add_subdirectory(InstPrinter)
add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/AVR/InstPrinter/CMakeLists.txt b/llvm/lib/Target/AVR/InstPrinter/CMakeLists.txt
deleted file mode 100644
index 0f3539a..0000000
--- a/llvm/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/llvm/lib/Target/AVR/InstPrinter/LLVMBuild.txt b/llvm/lib/Target/AVR/InstPrinter/LLVMBuild.txt
deleted file mode 100644
index 67203ff..0000000
--- a/llvm/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/llvm/lib/Target/AVR/LLVMBuild.txt b/llvm/lib/Target/AVR/LLVMBuild.txt
index 359ac1a..d488c9e 100644
--- a/llvm/lib/Target/AVR/LLVMBuild.txt
+++ b/llvm/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 @@
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/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
similarity index 100%
rename from llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
rename to llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
diff --git a/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.h b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
similarity index 100%
rename from llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.h
rename to llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
index 9791bce..47726df 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
+++ b/llvm/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/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
index eb7fe95..04a5bbc 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
@@ -2,6 +2,7 @@
AVRAsmBackend.cpp
AVRELFObjectWriter.cpp
AVRELFStreamer.cpp
+ AVRInstPrinter.cpp
AVRMCAsmInfo.cpp
AVRMCCodeEmitter.cpp
AVRMCELFStreamer.cpp
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt b/llvm/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt
index b62e615..45460e5 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt
+++ b/llvm/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