summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFilip Pizlo <fpizlo@apple.com>2013-09-13 22:59:47 +0000
committerFilip Pizlo <fpizlo@apple.com>2013-09-13 22:59:47 +0000
commite94e0984dfd22ede6211080d1f3e47138f1ea857 (patch)
tree1539ee84c9d712f6e657ee21790f26ed635b46d7 /include
parent98bae99266d8e527e7399c717a79c6dc9a073331 (diff)
downloadllvm-e94e0984dfd22ede6211080d1f3e47138f1ea857.tar.gz
llvm-e94e0984dfd22ede6211080d1f3e47138f1ea857.tar.bz2
llvm-e94e0984dfd22ede6211080d1f3e47138f1ea857.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/ManagedStatic.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h
index 4171d1bec8..5587618d11 100644
--- a/include/llvm/Support/ManagedStatic.h
+++ b/include/llvm/Support/ManagedStatic.h
@@ -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 {