mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Move CFG building code to a new lib/MC/MCAnalysis library.
The new library is 150KB on a Release+Asserts build, so it is quiet a bit of code that regular users of MC don't need to link with now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a42211335a
commit
cca08872b0
@ -17,7 +17,7 @@
|
|||||||
#define LLVM_MC_MCMODULEYAML_H
|
#define LLVM_MC_MCMODULEYAML_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
@ -8,7 +8,6 @@ add_llvm_library(LLVMMC
|
|||||||
MCAsmInfoELF.cpp
|
MCAsmInfoELF.cpp
|
||||||
MCAsmStreamer.cpp
|
MCAsmStreamer.cpp
|
||||||
MCAssembler.cpp
|
MCAssembler.cpp
|
||||||
MCAtom.cpp
|
|
||||||
MCCodeEmitter.cpp
|
MCCodeEmitter.cpp
|
||||||
MCCodeGenInfo.cpp
|
MCCodeGenInfo.cpp
|
||||||
MCContext.cpp
|
MCContext.cpp
|
||||||
@ -17,7 +16,6 @@ add_llvm_library(LLVMMC
|
|||||||
MCELF.cpp
|
MCELF.cpp
|
||||||
MCELFObjectTargetWriter.cpp
|
MCELFObjectTargetWriter.cpp
|
||||||
MCELFStreamer.cpp
|
MCELFStreamer.cpp
|
||||||
MCFunction.cpp
|
|
||||||
MCExpr.cpp
|
MCExpr.cpp
|
||||||
MCExternalSymbolizer.cpp
|
MCExternalSymbolizer.cpp
|
||||||
MCInst.cpp
|
MCInst.cpp
|
||||||
@ -27,13 +25,9 @@ add_llvm_library(LLVMMC
|
|||||||
MCLinkerOptimizationHint.cpp
|
MCLinkerOptimizationHint.cpp
|
||||||
MCMachOStreamer.cpp
|
MCMachOStreamer.cpp
|
||||||
MCMachObjectTargetWriter.cpp
|
MCMachObjectTargetWriter.cpp
|
||||||
MCModule.cpp
|
|
||||||
MCModuleYAML.cpp
|
|
||||||
MCNullStreamer.cpp
|
MCNullStreamer.cpp
|
||||||
MCObjectFileInfo.cpp
|
MCObjectFileInfo.cpp
|
||||||
MCObjectDisassembler.cpp
|
|
||||||
MCObjectStreamer.cpp
|
MCObjectStreamer.cpp
|
||||||
MCObjectSymbolizer.cpp
|
|
||||||
MCObjectWriter.cpp
|
MCObjectWriter.cpp
|
||||||
MCRegisterInfo.cpp
|
MCRegisterInfo.cpp
|
||||||
MCRelocationInfo.cpp
|
MCRelocationInfo.cpp
|
||||||
@ -54,5 +48,6 @@ add_llvm_library(LLVMMC
|
|||||||
WinCOFFStreamer.cpp
|
WinCOFFStreamer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_subdirectory(MCAnalysis)
|
||||||
add_subdirectory(MCParser)
|
add_subdirectory(MCParser)
|
||||||
add_subdirectory(MCDisassembler)
|
add_subdirectory(MCDisassembler)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
subdirectories = MCDisassembler MCParser
|
subdirectories = MCAnalysis MCDisassembler MCParser
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Library
|
type = Library
|
||||||
|
8
lib/MC/MCAnalysis/CMakeLists.txt
Normal file
8
lib/MC/MCAnalysis/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
add_llvm_library(LLVMMCAnalysis
|
||||||
|
MCAtom.cpp
|
||||||
|
MCFunction.cpp
|
||||||
|
MCModule.cpp
|
||||||
|
MCModuleYAML.cpp
|
||||||
|
MCObjectDisassembler.cpp
|
||||||
|
MCObjectSymbolizer.cpp
|
||||||
|
)
|
5
lib/MC/MCAnalysis/LLVMBuild.txt
Normal file
5
lib/MC/MCAnalysis/LLVMBuild.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[component_0]
|
||||||
|
type = Library
|
||||||
|
name = MCAnalysis
|
||||||
|
parent = Libraries
|
||||||
|
required_libraries = MC Object Support
|
@ -7,8 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
@ -7,9 +7,9 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/MCFunction.h"
|
#include "llvm/MC/MCAnalysis/MCFunction.h"
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
@ -7,10 +7,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCFunction.h"
|
||||||
#include "llvm/MC/MCFunction.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
@ -11,10 +11,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/MCModuleYAML.h"
|
#include "llvm/MC/MCAnalysis/MCModuleYAML.h"
|
||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
#include "llvm/MC/MCFunction.h"
|
#include "llvm/MC/MCAnalysis/MCFunction.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
#include "llvm/Object/YAML.h"
|
#include "llvm/Object/YAML.h"
|
@ -13,11 +13,11 @@
|
|||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/ADT/Twine.h"
|
#include "llvm/ADT/Twine.h"
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCFunction.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include "llvm/MC/MCDisassembler.h"
|
#include "llvm/MC/MCDisassembler.h"
|
||||||
#include "llvm/MC/MCFunction.h"
|
|
||||||
#include "llvm/MC/MCInstrAnalysis.h"
|
#include "llvm/MC/MCInstrAnalysis.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
|
||||||
#include "llvm/MC/MCObjectSymbolizer.h"
|
#include "llvm/MC/MCObjectSymbolizer.h"
|
||||||
#include "llvm/Object/MachO.h"
|
#include "llvm/Object/MachO.h"
|
||||||
#include "llvm/Object/ObjectFile.h"
|
#include "llvm/Object/ObjectFile.h"
|
@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS
|
|||||||
${LLVM_TARGETS_TO_BUILD}
|
${LLVM_TARGETS_TO_BUILD}
|
||||||
DebugInfo
|
DebugInfo
|
||||||
MC
|
MC
|
||||||
|
MCAnalysis
|
||||||
Object
|
Object
|
||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
type = Tool
|
type = Tool
|
||||||
name = llvm-objdump
|
name = llvm-objdump
|
||||||
parent = Tools
|
parent = Tools
|
||||||
required_libraries = DebugInfo MC MCDisassembler MCParser Object all-targets
|
required_libraries = DebugInfo MC MCAnalysis MCDisassembler MCParser Object all-targets
|
||||||
|
@ -20,17 +20,17 @@
|
|||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/ADT/Triple.h"
|
#include "llvm/ADT/Triple.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCFunction.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
|
#include "llvm/MC/MCAnalysis/MCModuleYAML.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/MC/MCAtom.h"
|
|
||||||
#include "llvm/MC/MCContext.h"
|
#include "llvm/MC/MCContext.h"
|
||||||
#include "llvm/MC/MCDisassembler.h"
|
#include "llvm/MC/MCDisassembler.h"
|
||||||
#include "llvm/MC/MCFunction.h"
|
|
||||||
#include "llvm/MC/MCInst.h"
|
#include "llvm/MC/MCInst.h"
|
||||||
#include "llvm/MC/MCInstPrinter.h"
|
#include "llvm/MC/MCInstPrinter.h"
|
||||||
#include "llvm/MC/MCInstrAnalysis.h"
|
#include "llvm/MC/MCInstrAnalysis.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
|
||||||
#include "llvm/MC/MCModuleYAML.h"
|
|
||||||
#include "llvm/MC/MCObjectDisassembler.h"
|
#include "llvm/MC/MCObjectDisassembler.h"
|
||||||
#include "llvm/MC/MCObjectFileInfo.h"
|
#include "llvm/MC/MCObjectFileInfo.h"
|
||||||
#include "llvm/MC/MCObjectSymbolizer.h"
|
#include "llvm/MC/MCObjectSymbolizer.h"
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
set(LLVM_LINK_COMPONENTS
|
set(LLVM_LINK_COMPONENTS
|
||||||
MC
|
MCAnalysis
|
||||||
)
|
|
||||||
|
|
||||||
set(MCSources
|
|
||||||
MCAtomTest.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_llvm_unittest(MCTests
|
add_llvm_unittest(MCTests
|
||||||
${MCSources}
|
MCAtomTest.cpp
|
||||||
)
|
)
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/MCAtom.h"
|
#include "llvm/MC/MCAnalysis/MCAtom.h"
|
||||||
#include "llvm/MC/MCModule.h"
|
#include "llvm/MC/MCAnalysis/MCModule.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
LEVEL = ../..
|
LEVEL = ../..
|
||||||
TESTNAME = MC
|
TESTNAME = MC
|
||||||
LINK_COMPONENTS := MC
|
LINK_COMPONENTS := MCAnalysis
|
||||||
|
|
||||||
include $(LEVEL)/Makefile.config
|
include $(LEVEL)/Makefile.config
|
||||||
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
|
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
|
||||||
|
Loading…
Reference in New Issue
Block a user