summaryrefslogtreecommitdiff
path: root/lib/Support/CrashRecoveryContext.cpp
Commit message (Collapse)AuthorAge
* lib/Support/CrashRecoveryContext.cpp: Add Win32 support to ↵NAKAMURA Takumi2011-08-20
| | | | | | CrashRecoveryContext. Thanks to Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138199 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly initialize all fields in CrashReporterCleanupContext. This caused ↵Ted Kremenek2011-03-22
| | | | | | the buildbot failure earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128071 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily stop recovering resources in CrashRecoveryContext while I ↵Ted Kremenek2011-03-22
| | | | | | investigate further why this works on my machine and not on others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128065 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a means for CrashRecovery clients to determine if code is currently ↵Ted Kremenek2011-03-21
| | | | | | running while crash recovery cleanups are being processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128008 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContextCleanup to provide an easy method for clients to ↵Ted Kremenek2011-03-19
| | | | | | select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127929 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContext::GetCurrent() to return quickly if ↵Ted Kremenek2011-03-19
| | | | | | | | 'gCrsahRecoveryEnabled' is false. This avoids us needing to go to thread local storage for the performance sensitive case where we are compiling code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127928 91177308-0d34-0410-b5e6-96231b3b80d8
* Augment CrashRecoveryContext to have registered "cleanup" objects that can ↵Ted Kremenek2011-03-18
| | | | | | be used to release resources during a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127849 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecoveryContext: Add RunSafelyOnThread helper function.Daniel Dunbar2010-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118272 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecoveryContext: Add missing return, so that the signal fires after we ourDaniel Dunbar2010-10-18
| | | | | | | routine is off the stack. Otherwise we show up rather confusingly in the stack trace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116755 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecovery: Clear the current context on the first crash, to avoid ↵Daniel Dunbar2010-08-17
| | | | | | re-entering it if the cleanup code crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111309 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find ↵Daniel Dunbar2010-08-17
| | | | | | the active context from anywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111308 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecovery: Make CrashRecoveryContext static methods thread safe.Daniel Dunbar2010-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111307 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wmissing-field-initializers warnings.Daniel Dunbar2010-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109872 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecovery: Use ThreadLocal::erase() instead of set(0).Daniel Dunbar2010-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109752 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to include config.h, to pickup LLVM_ON_WIN32.Daniel Dunbar2010-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109721 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecoveryContext: Add a simple POSIX implementation.Daniel Dunbar2010-07-29
| | | | | | | | - This works, but won't handle crashes on stack overflow, or signals delivered to a thread other than the one that crashed. The latter is particular annoying on Darwin, because SIGABRT tends to go to the main thread. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109717 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Add CrashRecoveryContext helper object.Daniel Dunbar2010-07-28
- Designed as a simple wrapper to allow clients to attempt to catch crashes (memory errors, assertion violations, etc.) and do some kind of recovery. - Currently doesn't actually attempt to catch crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109586 91177308-0d34-0410-b5e6-96231b3b80d8