aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInvocationTest.cpp
diff options
context:
space:
mode:
authorChris Bowler <cebowleratibm@gmail.com>2022-06-10 10:04:07 -0400
committerLouis Dionne <ldionne.2@gmail.com>2023-09-05 13:44:10 -0400
commitfbdf684fae5243e7a9ff50dd4abdc5b55e6aa895 (patch)
treed037f7e7449f53ec2442f70fa43e20358a90505c /clang/unittests/Frontend/CompilerInvocationTest.cpp
parente6436952e3567835add61355e17366ab62bccebd (diff)
downloadllvm-fbdf684fae5243e7a9ff50dd4abdc5b55e6aa895.zip
llvm-fbdf684fae5243e7a9ff50dd4abdc5b55e6aa895.tar.gz
llvm-fbdf684fae5243e7a9ff50dd4abdc5b55e6aa895.tar.bz2
[libc++] Avoid destructor call for error_category singletons
When a handle to an error_category singleton object is used during the termination phase of a program, the destruction of the error_category object may have occurred prior to execution of the current destructor or function registered with atexit, because the singleton object may have been constructed after the corresponding initialization or call to atexit. For example, the updated tests from this patch will fail if using a libc++ built using a compiler that updates the vtable of the object on destruction. This patch attempts to avoid the issue by causing the destructor to not be called in the style of ResourceInitHelper in src/experimental/memory_resource.cpp. This approach might not work if object lifetime is strictly enforced. Differential Revision: https://reviews.llvm.org/D65667 Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions