Skip to content

Commit

Permalink
[RISCV] Move InstPrinter files to MCTargetDesc. NFC
Browse files Browse the repository at this point in the history
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: 360505
  • Loading branch information
Weverything committed May 11, 2019
1 parent bbdc859 commit 00ecf67
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 33 deletions.
1 change: 0 additions & 1 deletion llvm/lib/Target/RISCV/CMakeLists.txt
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions llvm/lib/Target/RISCV/InstPrinter/CMakeLists.txt

This file was deleted.

22 changes: 0 additions & 22 deletions llvm/lib/Target/RISCV/InstPrinter/LLVMBuild.txt

This file was deleted.

4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/LLVMBuild.txt
Expand Up @@ -15,7 +15,7 @@
;===------------------------------------------------------------------------===;

[common]
subdirectories = AsmParser Disassembler InstPrinter TargetInfo MCTargetDesc Utils
subdirectories = AsmParser Disassembler TargetInfo MCTargetDesc Utils

[component_0]
type = TargetGroup
Expand All @@ -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
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
@@ -1,6 +1,7 @@
add_llvm_library(LLVMRISCVDesc
RISCVAsmBackend.cpp
RISCVELFObjectWriter.cpp
RISCVInstPrinter.cpp
RISCVMCAsmInfo.cpp
RISCVMCCodeEmitter.cpp
RISCVMCExpr.cpp
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/MCTargetDesc/LLVMBuild.txt
Expand Up @@ -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
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
Expand Up @@ -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"
Expand Down

0 comments on commit 00ecf67

Please sign in to comment.