[compiler-rt] 27f3454 - [scudo/standalone] Don't define test main function for Fuchsia

Roland McGrath via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 17:43:09 PDT 2020


Author: Roland McGrath
Date: 2020-09-17T17:42:53-07:00
New Revision: 27f34540ea56207f527dba6bbb9cd25a57be3f62

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

LOG: [scudo/standalone] Don't define test main function for Fuchsia

Fuchsia's unit test library provides the main function by default.

Reviewed By: cryptoad

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

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
index 20deca998d96..9bbf6e75a5cd 100644
--- a/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
@@ -29,11 +29,11 @@ __scudo_default_options() {
          "dealloc_type_mismatch=" DEALLOC_TYPE_MISMATCH;
 }
 
-int main(int argc, char **argv) {
+// The zxtest library provides a default main function that does the same thing
+// for Fuchsia builds.
 #if !SCUDO_FUCHSIA
+int main(int argc, char **argv) {
   testing::InitGoogleTest(&argc, argv);
   return RUN_ALL_TESTS();
-#else
-  return RUN_ALL_TESTS(argc, argv);
-#endif
 }
+#endif


        


More information about the llvm-commits mailing list