[all-commits] [llvm/llvm-project] 504bc0: [runtimes] Use int main(int, char**) consistently ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Oct 8 11:28:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 504bc07d1afc7bad7b980a977141696ec8298e7e
      https://github.com/llvm/llvm-project/commit/504bc07d1afc7bad7b980a977141696ec8298e7e
  Author: Louis Dionne <ldionne at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M libcxx/test/libcxx/depr/depr.c.headers/math_h.compile.pass.cpp
    M libcxx/test/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp
    M libcxx/test/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp
    M libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
    M libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
    M libcxx/test/libcxx/min_max_macros.compile.pass.cpp
    M libcxx/test/libcxx/no_assert_include.compile.pass.cpp
    M libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp
    M libcxx/test/libcxx/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
    M libcxx/test/libcxx/selftest/compile.fail.cpp/compile-success.compile.fail.cpp
    M libcxx/test/libcxx/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
    M libcxx/test/libcxx/selftest/compile.pass.cpp/compile-success.compile.pass.cpp
    M libcxx/test/libcxx/selftest/compile.pass.cpp/link-error.compile.pass.cpp
    M libcxx/test/libcxx/selftest/compile.pass.cpp/run-error.compile.pass.cpp
    M libcxx/test/libcxx/selftest/fail.cpp/compile-success.fail.cpp
    M libcxx/test/libcxx/selftest/fail.cpp/no-diagnostics-unmarked.fail.cpp
    M libcxx/test/libcxx/selftest/fail.cpp/right-diagnostic.fail.cpp
    M libcxx/test/libcxx/selftest/fail.cpp/wrong-diagnostic.fail.cpp
    M libcxx/test/libcxx/selftest/link.fail.cpp/compile-error.link.fail.cpp
    M libcxx/test/libcxx/selftest/link.fail.cpp/link-error.link.fail.cpp
    M libcxx/test/libcxx/selftest/link.fail.cpp/link-success.link.fail.cpp
    M libcxx/test/libcxx/selftest/link.pass.cpp/compile-error.link.pass.cpp
    M libcxx/test/libcxx/selftest/link.pass.cpp/link-error.link.pass.cpp
    M libcxx/test/libcxx/selftest/link.pass.cpp/link-success.link.pass.cpp
    M libcxx/test/libcxx/selftest/link.pass.cpp/run-error.link.pass.cpp
    M libcxx/test/libcxx/selftest/pass.cpp/compile-error.pass.cpp
    M libcxx/test/libcxx/selftest/pass.cpp/link-error.pass.cpp
    M libcxx/test/libcxx/selftest/pass.cpp/run-error.pass.cpp
    M libcxx/test/libcxx/selftest/pass.cpp/run-success.pass.cpp
    M libcxx/test/libcxx/selftest/pass.cpp/werror.pass.cpp
    M libcxx/test/libcxx/selftest/pass.mm/compile-error.pass.mm
    M libcxx/test/libcxx/selftest/pass.mm/link-error.pass.mm
    M libcxx/test/libcxx/selftest/pass.mm/no-arc.pass.mm
    M libcxx/test/libcxx/selftest/pass.mm/run-error.pass.mm
    M libcxx/test/libcxx/selftest/pass.mm/run-success.pass.mm
    M libcxx/test/libcxx/selftest/pass.mm/use-objective-cxx.pass.mm
    M libcxx/test/libcxx/selftest/run.fail.cpp/compile-error.run.fail.cpp
    M libcxx/test/libcxx/selftest/run.fail.cpp/link-error.run.fail.cpp
    M libcxx/test/libcxx/selftest/run.fail.cpp/run-error.run.fail.cpp
    M libcxx/test/libcxx/selftest/run.fail.cpp/run-success.run.fail.cpp
    M libcxx/test/libcxx/selftest/sh.cpp/werror.sh.cpp
    M libcxx/test/libcxx/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp
    M libcxx/test/libcxx/selftest/verify.cpp/no-werror.verify.cpp
    M libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
    M libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
    M libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
    M libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
    M libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
    M libcxx/test/std/input.output/iostream.objects/init.pass.cpp
    M libcxx/test/std/language.support/support.dynamic/destroying_delete_t.pass.cpp
    M libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
    M libcxx/test/std/namespace/addressable_functions.sh.cpp
    M libcxx/test/std/numerics/bit/bit.pow.two/ceil2.fail.cpp
    M libcxx/test/std/numerics/bit/bit.pow.two/ceil2.pass.cpp
    M libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
    M libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
    M libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
    M libcxx/test/std/numerics/numbers/defined.pass.cpp
    M libcxx/test/std/numerics/numbers/illformed.verify.cpp
    M libcxx/test/std/numerics/numbers/specialize.pass.cpp
    M libcxx/test/std/numerics/numbers/user_type.pass.cpp
    M libcxx/test/std/numerics/numbers/value.pass.cpp
    M libcxx/test/std/re/re.const/re.matchflag/match_prev_avail.pass.cpp
    A libcxx/test/std/strings/string.view/string.view.io/stream_insert_decl_present.compile.pass.cpp
    R libcxx/test/std/strings/string.view/string.view.io/stream_insert_decl_present.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp
    M libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/ctor.incomplete.pass.cpp
    M libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref.incomplete.pass.cpp
    M libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref.incomplete.pass.cpp
    M libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.incomplete.compile.fail.cpp
    M libcxxabi/test/backtrace_test.pass.cpp
    M libcxxabi/test/catch_array_01.pass.cpp
    M libcxxabi/test/catch_array_02.pass.cpp
    M libcxxabi/test/catch_class_01.pass.cpp
    M libcxxabi/test/catch_class_02.pass.cpp
    M libcxxabi/test/catch_class_03.pass.cpp
    M libcxxabi/test/catch_class_04.pass.cpp
    M libcxxabi/test/catch_const_pointer_nullptr.pass.cpp
    M libcxxabi/test/catch_function_01.pass.cpp
    M libcxxabi/test/catch_function_02.pass.cpp
    M libcxxabi/test/catch_function_03.pass.cpp
    M libcxxabi/test/catch_in_noexcept.pass.cpp
    M libcxxabi/test/catch_member_data_pointer_01.pass.cpp
    M libcxxabi/test/catch_member_function_pointer_01.pass.cpp
    M libcxxabi/test/catch_member_function_pointer_02.pass.cpp
    M libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
    M libcxxabi/test/catch_multi_level_pointer.pass.cpp
    M libcxxabi/test/catch_pointer_nullptr.pass.cpp
    M libcxxabi/test/catch_pointer_reference.pass.cpp
    M libcxxabi/test/catch_ptr.pass.cpp
    M libcxxabi/test/catch_ptr_02.pass.cpp
    M libcxxabi/test/catch_reference_nullptr.pass.cpp
    M libcxxabi/test/cxa_thread_atexit_test.pass.cpp
    M libcxxabi/test/dynamic_cast.pass.cpp
    M libcxxabi/test/dynamic_cast14.pass.cpp
    M libcxxabi/test/dynamic_cast3.pass.cpp
    M libcxxabi/test/dynamic_cast5.pass.cpp
    M libcxxabi/test/dynamic_cast_stress.pass.cpp
    M libcxxabi/test/exception_object_alignment.2.pass.cpp
    M libcxxabi/test/exception_object_alignment.pass.cpp
    M libcxxabi/test/guard_test_basic.pass.cpp
    M libcxxabi/test/guard_threaded_test.pass.cpp
    M libcxxabi/test/incomplete_type.sh.cpp
    M libcxxabi/test/inherited_exception.pass.cpp
    M libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
    M libcxxabi/test/test_demangle.pass.cpp
    M libcxxabi/test/test_exception_address_alignment.pass.cpp
    M libcxxabi/test/test_guard.pass.cpp
    M libcxxabi/test/test_vector3.pass.cpp
    M libcxxabi/test/thread_local_destruction_order.pass.cpp
    M libcxxabi/test/unittest_demangle.pass.cpp
    M libcxxabi/test/unwind_01.pass.cpp
    M libcxxabi/test/unwind_02.pass.cpp
    M libcxxabi/test/unwind_03.pass.cpp
    M libcxxabi/test/unwind_04.pass.cpp
    M libcxxabi/test/unwind_05.pass.cpp
    M libcxxabi/test/unwind_06.pass.cpp
    A libunwind/test/alignment.compile.pass.cpp
    R libunwind/test/alignment.pass.cpp
    M libunwind/test/frameheadercache_test.pass.cpp
    M libunwind/test/libunwind_01.pass.cpp
    M libunwind/test/libunwind_02.pass.cpp
    M libunwind/test/signal_frame.pass.cpp
    M libunwind/test/signal_unwind.pass.cpp
    M libunwind/test/unw_getcontext.pass.cpp
    M libunwind/test/unwind_leaffunction.pass.cpp

  Log Message:
  -----------
  [runtimes] Use int main(int, char**) consistently in tests

This is needed when running the tests in Freestanding mode, where main()
isn't treated specially. In Freestanding, main() doesn't get mangled as
extern "C", so whatever runtime we're using fails to find the entry point.

One way to solve this problem is to define a symbol alias from __Z4mainiPPc
to _main, however this requires all definitions of main() to have the same
mangling. Hence this commit.




More information about the All-commits mailing list