//===- unittest/BinaryFormat/MachOTest.cpp - MachO support tests ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/ADT/bit.h" #include "llvm/BinaryFormat/MachO.h" #include "llvm/TargetParser/Triple.h" #include "gtest/gtest.h" usingnamespacellvm; usingnamespacellvm::MachO; #if BYTE_ORDER == BIG_ENDIAN // As discussed in Issue #86793, this test cannot work on a strict-alignment // targets like SPARC. Besides, it's undefined behaviour on big-endian hosts. #define MAYBE_UnalignedLC … #else #define MAYBE_UnalignedLC … #endif TEST(MachOTest, MAYBE_UnalignedLC) { … } TEST(MachOTest, CPUType) { … } TEST(MachOTest, CPUSubType) { … } TEST(MachOTest, CPUSubTypePtrAuthABI) { … }