[libcxx-commits] [libcxxabi] c40b831 - [libc++abi] Fix forced_unwind tests failures on ARM/EHABI targets.

Vladimir Vereschaka via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 12 14:00:24 PST 2021


Author: Vladimir Vereschaka
Date: 2021-02-12T13:58:41-08:00
New Revision: c40b83199f01f36647b083dfd353d92134bc4973

URL: https://github.com/llvm/llvm-project/commit/c40b83199f01f36647b083dfd353d92134bc4973
DIFF: https://github.com/llvm/llvm-project/commit/c40b83199f01f36647b083dfd353d92134bc4973.diff

LOG: [libc++abi] Fix forced_unwind tests failures on ARM/EHABI targets.

Added __cxxabi_config.h includes to resolve _LIBCXXABI_ARM_EHABI and
proper building the forces_unwindX.cpp tests for the ARM/EHABI targets.

Differential Revision: https://reviews.llvm.org/D96378

Added: 
    

Modified: 
    libcxxabi/test/forced_unwind1.pass.cpp
    libcxxabi/test/forced_unwind2.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/test/forced_unwind1.pass.cpp b/libcxxabi/test/forced_unwind1.pass.cpp
index b98f5721b8c3..8f06f84190fe 100644
--- a/libcxxabi/test/forced_unwind1.pass.cpp
+++ b/libcxxabi/test/forced_unwind1.pass.cpp
@@ -15,9 +15,12 @@
 #include <string.h>
 #include <unwind.h>
 #include <tuple>
+#include <__cxxabi_config.h>
 
 #if defined(_LIBCXXABI_ARM_EHABI)
-int main() {}
+int main(int, char**) {
+  return 0;
+}
 #else
 static int bits = 0;
 
@@ -74,7 +77,7 @@ static void test() {
   }
 }
 
-int main() {
+int main(int, char**) {
   test();
   return bits != 15;
 }

diff  --git a/libcxxabi/test/forced_unwind2.pass.cpp b/libcxxabi/test/forced_unwind2.pass.cpp
index ee11b69f99dc..db57ecc08df5 100644
--- a/libcxxabi/test/forced_unwind2.pass.cpp
+++ b/libcxxabi/test/forced_unwind2.pass.cpp
@@ -16,9 +16,12 @@
 #include <string.h>
 #include <unwind.h>
 #include <tuple>
+#include <__cxxabi_config.h>
 
 #if defined(_LIBCXXABI_ARM_EHABI)
-int main() {}
+int main(int, char**) {
+  return 0;
+}
 #else
 template <typename T>
 struct Stop;
@@ -50,7 +53,7 @@ static void test() noexcept { forced_unwind(); }
 
 static void terminate() { exit(0); }
 
-int main() {
+int main(int, char**) {
   std::set_terminate(terminate);
   try {
     test();


        


More information about the libcxx-commits mailing list