mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-01-08 14:22:53 +00:00
Make PrettyStackTraceEntry use ManagedStatic for its ThreadLocal.
This was somewhat tricky because ~PrettyStackTraceEntry() may run after llvm_shutdown() has been called. This is rare and only happens for a common idiom used in the main() functions of command-line tools. This works around the idiom by skipping the stack clean-up if the PrettyStackTraceHead ManagedStatic is not constructed (i.e. llvm_shutdown() has been called). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190730 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -99,7 +99,6 @@ public:
|
||||
/// llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
|
||||
void llvm_shutdown();
|
||||
|
||||
|
||||
/// llvm_shutdown_obj - This is a simple helper class that calls
|
||||
/// llvm_shutdown() when it is destroyed.
|
||||
struct llvm_shutdown_obj {
|
||||
|
||||
Reference in New Issue
Block a user