Fangrui Song a5cc95147e
[BinaryFormat] Adjust OSABI functions and add unittests
Adjust #89280:

* ELFOSABI_LINUX is a historical alias that should not be used in new
  code. readelf -h displays "UNIX - GNU" instead of "Linux".
* "OS" is inappropriate. Some values are architecture-specific, e.g.
  ELFOSABI_ARM.
* Drop lowercase, which seems a job of the caller.

Add some unittests.

Pull Request: https://github.com/llvm/llvm-project/pull/90270
2024-04-29 13:11:58 -07:00

16 lines
241 B
CMake

set(LLVM_LINK_COMPONENTS
BinaryFormat
TargetParser
)
add_llvm_unittest(BinaryFormatTests
DwarfTest.cpp
ELFTest.cpp
MachOTest.cpp
MsgPackDocumentTest.cpp
MsgPackReaderTest.cpp
MsgPackWriterTest.cpp
TestFileMagic.cpp
)