aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-08-07 17:47:03 +0000
committerNico Weber <nicolasweber@gmx.de>2015-08-07 17:47:03 +0000
commitaf3f242016130387f45798b165399bfcaa7ca0b8 (patch)
tree3ebf882eb7dc602a9e4861c7042a3d1a21e7a628 /llvm/lib/Transforms/Utils/Local.cpp
parent2692811d00284bae0d8e346b59b7ef410292f8d0 (diff)
downloadllvm-af3f242016130387f45798b165399bfcaa7ca0b8.zip
llvm-af3f242016130387f45798b165399bfcaa7ca0b8.tar.gz
llvm-af3f242016130387f45798b165399bfcaa7ca0b8.tar.bz2
Add functions to save and restore the PrettyStackTrace state.
PrettyStackTraceHead is a LLVM_THREAD_LOCAL, which means it's just a global in LLVM_ENABLE_THREADS=NO builds. If a CrashRecoveryContext is used with code that uses PrettyStackEntries, and a crash happens, PrettyStackTraceHead is currently not reset to its pre-crash value. These functions make it possible to add a cleanup to such code that does this. (Not reseting the value then causes the assert in ~PrettyStackTraceEntry() to fire if the code outside of the CrashRecoveryContext also uses PrettyStackEntries -- for example, clang when building a module.) Part of PR11974. llvm-svn: 244338
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions