[test-suite] Fix custom section test on MachO Platforms
Fix the tests added in https://reviews.llvm.org/D154673 to work on apple
platforms.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D156462
diff --git a/SingleSource/Regression/C++/custom_section_members.cpp b/SingleSource/Regression/C++/custom_section_members.cpp
index 23202fb..bcab756 100644
--- a/SingleSource/Regression/C++/custom_section_members.cpp
+++ b/SingleSource/Regression/C++/custom_section_members.cpp
@@ -1,8 +1,13 @@
// Test that we can compile a simple class with members in a custom section.
+#if defined(__APPLE__)
+#define SECTNAME "__TEXT,__section"
+#else
+#define SECTNAME "section"
+#endif
struct A {
- static int foo() __attribute__((section("section")));
- static void bar() __attribute__((section("section")));
+ static int foo() __attribute__((section(SECTNAME)));
+ static void bar() __attribute__((section(SECTNAME)));
};
int A::foo() { return 0; }