EXPECT_TRUE(testStructuralMatch(t));
}
-// These attributes may not be available on certain platforms.
-#if defined(__x86_64__) && defined(__linux__)
TEST_F(StructuralEquivalenceFunctionTest,
FunctionsWithDifferentCallingConventions) {
+ // These attributes may not be available on certain platforms.
+ if (llvm::Triple(llvm::sys::getDefaultTargetTriple()).getArch() !=
+ llvm::Triple::x86_64)
+ return;
auto t = makeNamedDecls(
"__attribute__((preserve_all)) void foo();",
"__attribute__((ms_abi)) void foo();",
}
TEST_F(StructuralEquivalenceFunctionTest, FunctionsWithDifferentSavedRegsAttr) {
+ if (llvm::Triple(llvm::sys::getDefaultTargetTriple()).getArch() !=
+ llvm::Triple::x86_64)
+ return;
auto t = makeNamedDecls(
"__attribute__((no_caller_saved_registers)) void foo();",
" void foo();",
Lang_C);
EXPECT_FALSE(testStructuralMatch(t));
}
-#endif
struct StructuralEquivalenceCXXMethodTest : StructuralEquivalenceTest {
};