[ARM64] Move ARM64BaseInfo.{cpp,h} into a Utils/ subdirectory, a la AArch64. These files are required in the decoder, disassembler and parser, and a layering violation was imminent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bradley Smith 2014-04-09 14:42:27 +00:00
parent 0fc7d2bdd2
commit 01229fa891
17 changed files with 56 additions and 13 deletions

View File

@ -15,7 +15,7 @@
#ifndef TARGET_ARM64_H
#define TARGET_ARM64_H
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "Utils/ARM64BaseInfo.h"
#include "MCTargetDesc/ARM64MCTargetDesc.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/DataTypes.h"

View File

@ -13,8 +13,8 @@
//===----------------------------------------------------------------------===//
#include "ARM64MCInstLower.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "MCTargetDesc/ARM64MCExpr.h"
#include "Utils/ARM64BaseInfo.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineInstr.h"

View File

@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
#include "MCTargetDesc/ARM64AddressingModes.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "MCTargetDesc/ARM64MCExpr.h"
#include "Utils/ARM64BaseInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"

View File

@ -48,3 +48,4 @@ add_subdirectory(AsmParser)
add_subdirectory(Disassembler)
add_subdirectory(InstPrinter)
add_subdirectory(MCTargetDesc)
add_subdirectory(Utils)

View File

@ -14,8 +14,8 @@
#include "ARM64Disassembler.h"
#include "ARM64Subtarget.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "MCTargetDesc/ARM64AddressingModes.h"
#include "Utils/ARM64BaseInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCContext.h"

View File

@ -19,6 +19,6 @@
type = Library
name = ARM64Disassembler
parent = ARM64
required_libraries = ARM64Desc ARM64Info MC Support
required_libraries = ARM64Desc ARM64Info ARM64Utils MC Support
add_to_library_groups = ARM64

View File

@ -14,7 +14,7 @@
#define DEBUG_TYPE "asm-printer"
#include "ARM64InstPrinter.h"
#include "MCTargetDesc/ARM64AddressingModes.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "Utils/ARM64BaseInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/MCInst.h"

View File

@ -19,6 +19,6 @@
type = Library
name = ARM64AsmPrinter
parent = ARM64
required_libraries = MC Support
required_libraries = ARM64Utils MC Support
add_to_library_groups = ARM64

View File

@ -16,7 +16,7 @@
;===------------------------------------------------------------------------===;
[common]
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo Utils
[component_0]
type = TargetGroup
@ -31,6 +31,6 @@ has_jit = 1
type = Library
name = ARM64CodeGen
parent = ARM64
required_libraries = ARM64AsmPrinter ARM64Desc ARM64Info Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target
required_libraries = ARM64AsmPrinter ARM64Desc ARM64Info ARM64Utils Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target
add_to_library_groups = ARM64

View File

@ -13,9 +13,9 @@
#define DEBUG_TYPE "mccodeemitter"
#include "MCTargetDesc/ARM64AddressingModes.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "MCTargetDesc/ARM64FixupKinds.h"
#include "MCTargetDesc/ARM64MCExpr.h"
#include "Utils/ARM64BaseInfo.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInst.h"

View File

@ -1,6 +1,5 @@
add_llvm_library(LLVMARM64Desc
ARM64AsmBackend.cpp
ARM64BaseInfo.cpp
ARM64ELFObjectWriter.cpp
ARM64ELFStreamer.cpp
ARM64MCAsmInfo.cpp

View File

@ -20,6 +20,6 @@ BUILT_SOURCES = ARM64GenRegisterInfo.inc ARM64GenInstrInfo.inc \
ARM64GenFastISel.inc ARM64GenDisassemblerTables.inc \
ARM64GenMCPseudoLowering.inc
DIRS = TargetInfo InstPrinter AsmParser Disassembler MCTargetDesc
DIRS = TargetInfo InstPrinter AsmParser Disassembler MCTargetDesc Utils
include $(LEVEL)/Makefile.common

View File

@ -17,7 +17,9 @@
#ifndef ARM64BASEINFO_H
#define ARM64BASEINFO_H
#include "ARM64MCTargetDesc.h"
// FIXME: Is it easiest to fix this layering violation by moving the .inc
// #includes from ARM64MCTargetDesc.h to here?
#include "MCTargetDesc/ARM64MCTargetDesc.h" // For ARM64::X0 and friends.
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"

View File

@ -0,0 +1,3 @@
add_llvm_library(LLVMARM64Utils
ARM64BaseInfo.cpp
)

View File

@ -0,0 +1,23 @@
;===- ./lib/Target/ARM64/Utils/LLVMBuild.txt ----------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; 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 = ARM64Utils
parent = ARM64
required_libraries = Support
add_to_library_groups = ARM64

View File

@ -0,0 +1,15 @@
##===- lib/Target/ARM64/Utils/Makefile -------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
LIBRARYNAME = LLVMARM64Utils
# Hack: we need to include 'main' ARM64 target directory to grab private headers
#CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
include $(LEVEL)/Makefile.common