mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
f09cf34d00
This is a fairly large changeset, but it can be broken into a few pieces: - `llvm/Support/*TargetParser*` are all moved from the LLVM Support component into a new LLVM Component called "TargetParser". This potentially enables using tablegen to maintain this information, as is shown in https://reviews.llvm.org/D137517. This cannot currently be done, as llvm-tblgen relies on LLVM's Support component. - This also moves two files from Support which use and depend on information in the TargetParser: - `llvm/Support/Host.{h,cpp}` which contains functions for inspecting the current Host machine for info about it, primarily to support getting the host triple, but also for `-mcpu=native` support in e.g. Clang. This is fairly tightly intertwined with the information in `X86TargetParser.h`, so keeping them in the same component makes sense. - `llvm/ADT/Triple.h` and `llvm/Support/Triple.cpp`, which contains the target triple parser and representation. This is very intertwined with the Arm target parser, because the arm architecture version appears in canonical triples on arm platforms. - I moved the relevant unittests to their own directory. And so, we end up with a single component that has all the information about the following, which to me seems like a unified component: - Triples that LLVM Knows about - Architecture names and CPUs that LLVM knows about - CPU detection logic for LLVM Given this, I have also moved `RISCVISAInfo.h` into this component, as it seems to me to be part of that same set of functionality. If you get link errors in your components after this patch, you likely need to add TargetParser into LLVM_LINK_COMPONENTS in CMake. Differential Revision: https://reviews.llvm.org/D137838
65 lines
1.3 KiB
CMake
65 lines
1.3 KiB
CMake
add_lldb_unittest(UtilityTests
|
|
AnsiTerminalTest.cpp
|
|
ArgsTest.cpp
|
|
OptionsWithRawTest.cpp
|
|
ArchSpecTest.cpp
|
|
BroadcasterTest.cpp
|
|
ConstStringTest.cpp
|
|
CompletionRequestTest.cpp
|
|
DataBufferTest.cpp
|
|
DataEncoderTest.cpp
|
|
DataExtractorTest.cpp
|
|
EnvironmentTest.cpp
|
|
EventTest.cpp
|
|
FileSpecTest.cpp
|
|
FlagsTest.cpp
|
|
ListenerTest.cpp
|
|
LogTest.cpp
|
|
NameMatchesTest.cpp
|
|
PredicateTest.cpp
|
|
ProcessInfoTest.cpp
|
|
ProcessInstanceInfoTest.cpp
|
|
RangeMapTest.cpp
|
|
RangeTest.cpp
|
|
RegisterValueTest.cpp
|
|
RegularExpressionTest.cpp
|
|
ScalarTest.cpp
|
|
SharedClusterTest.cpp
|
|
StateTest.cpp
|
|
StatusTest.cpp
|
|
StreamTeeTest.cpp
|
|
StreamTest.cpp
|
|
StringExtractorGDBRemoteTest.cpp
|
|
StringExtractorTest.cpp
|
|
StringLexerTest.cpp
|
|
StringListTest.cpp
|
|
StructuredDataTest.cpp
|
|
SubsystemRAIITest.cpp
|
|
TildeExpressionResolverTest.cpp
|
|
TimeoutTest.cpp
|
|
TimerTest.cpp
|
|
TraceGDBRemotePacketsTest.cpp
|
|
UriParserTest.cpp
|
|
UserIDResolverTest.cpp
|
|
UUIDTest.cpp
|
|
VASprintfTest.cpp
|
|
VMRangeTest.cpp
|
|
XcodeSDKTest.cpp
|
|
|
|
LINK_LIBS
|
|
lldbUtility
|
|
lldbUtilityHelpers
|
|
LLVMTestingSupport
|
|
LINK_COMPONENTS
|
|
Support
|
|
TargetParser
|
|
)
|
|
|
|
set(test_inputs
|
|
StructuredData-basic.json
|
|
StructuredData-nested.json
|
|
StructuredData-full.json
|
|
)
|
|
|
|
add_unittest_inputs(UtilityTests "${test_inputs}")
|