Page MenuHomePhabricator

[libc++] Use __verbose_abort in additional contexts
Needs ReviewPublic

Authored by ldionne on Aug 10 2022, 2:25 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Instead of only using __verbose_abort to handle assertions, also use
it to handle exceptions thrown under -fno-exceptions and when
std::unreachable() is called. This will provide a strictly better
user experience in these cases, since we will provide additional
information in the logs over a simple std::abort().

Diff Detail

Unit TestsFailed

TimeTest
79,670 mslibcxx CI C++2b > llvm-libc++-shared-cfg-in.libcxx::transitive_includes.sh.cpp
Script: -- : 'RUN: at line 84'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/libcxx/test/libcxx/transitive_includes.sh.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/build/generic-cxx2b/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/build/generic-cxx2b/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++2b -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings --trace-includes -fsyntax-only -DTEST_0 2>&1 | /usr/bin/python3.10 /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/libcxx/test/libcxx/transitive_includes.sanitize.py > /home/libcxx-builder/.buildkite-agent/builds/6d5b5fee85f8-1/llvm-project/libcxx-ci/build/generic-cxx2b/test/libcxx/Output/transitive_includes.sh.cpp.dir/t.tmp.actual.algorithm

Event Timeline

ldionne created this revision.Aug 10 2022, 2:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2022, 2:25 PM
Herald added a subscriber: smeenai. · View Herald Transcript
ldionne requested review of this revision.Aug 10 2022, 2:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2022, 2:25 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik added inline comments.
libcxx/include/__filesystem/filesystem_error.h
94

Might as well remove _VSTD while you're at it.

libcxx/include/__verbose_abort
59

I don't think file and line are useful here. They will just be the file and line of the throw wrapper.

67

Why do you have this as an extra macro? It's used in just a single place.