Hans Wennborg
00bac51e3e
Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories; other minor cleanups.
...
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13172
llvm-svn: 248811
2015-09-29 18:02:48 +00:00
NAKAMURA Takumi
1b224b5ec5
Reformat headers in ADT and Support partially.
...
Note, I didn't reformat entirely, but partially where I touched in previous commits.
llvm-svn: 244432
2015-08-10 04:22:36 +00:00
NAKAMURA Takumi
c1197d9021
Whitespace.
...
llvm-svn: 244431
2015-08-10 04:22:09 +00:00
NAKAMURA Takumi
b93b06ef3e
Reformat linebreaks.
...
llvm-svn: 244430
2015-08-10 04:21:43 +00:00
Nico Weber
4a603af6f2
Fix nested CrashRecoveryContexts with LLVM_ENABLE_THREADS=OFF, allow them.
...
libclang uses a CrashRecoveryContext, and building a module does too. If a
module gets built through libclang, nested CrashRecoveryContexts are used. They
work fine with threads as things are stored in ThreadLocal variables, but in
LLVM_ENABLE_THREADS=OFF builds the two recovery contexts would write to the
same globals.
To fix, keep active CrashRecoveryContextImpls in a list and have the global
point to the innermost one, and do something similar for
tlIsRecoveringFromCrash.
Necessary (but not sufficient) for PR11974 and PR20325
http://reviews.llvm.org/D11770
llvm-svn: 244251
2015-08-06 19:21:25 +00:00
Alexander Kornienko
f993659b8f
Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
...
Apparently, the style needs to be agreed upon first.
llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802
Fixed/added namespace ending comments using clang-tidy. NFC
...
The patch is generated using this command:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
llvm/lib/
Thanks to Eugene Kosov for the original patch!
llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Benjamin Kramer
45a545b9c6
Purge unused includes throughout libSupport.
...
NFC.
llvm-svn: 232976
2015-03-23 18:07:13 +00:00
Chandler Carruth
0b619fcc8e
[cleanup] Re-sort all the #include lines in LLVM using
...
utils/sort_includes.py.
I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.
llvm-svn: 225974
2015-01-14 11:23:27 +00:00
Benjamin Kramer
e991977346
Add override to overriden virtual methods, remove virtual keywords.
...
No functionality change. Changes made by clang-tidy + some manual cleanup.
llvm-svn: 217028
2014-09-03 11:41:21 +00:00
Argyrios Kyrtzidis
2cce248daa
For CrashRecoveryContext::RunSafelyOnThread, propagate Darwin's PRIO_DARWIN_BG to the new thread if it is
...
set on the calling thread.
This allows libclang's indexing threads to propagate their priority to the clang module building threads.
rdar://17459872
llvm-svn: 211747
2014-06-25 23:54:50 +00:00
Richard Smith
55381ccf0a
Re-commit r208025, reverted in r208030, with a fix for a conformance issue
...
which GCC detects and Clang does not!
llvm-svn: 208033
2014-05-06 01:44:26 +00:00
Richard Smith
b38145eb67
Revert r208025, which made buildbots unhappy for unknown reasons.
...
llvm-svn: 208030
2014-05-06 01:26:00 +00:00
Richard Smith
e9d2d57a7c
Add llvm::function_ref (and a couple of uses of it), representing a type-erased reference to a callable object.
...
llvm-svn: 208025
2014-05-06 01:01:29 +00:00
Craig Topper
ee78063a54
[C++11] Make use of 'nullptr' in the Support library.
...
llvm-svn: 205697
2014-04-07 04:17:22 +00:00
Richard Smith
ef4019bc68
Remove dependence on std::function.
...
llvm-svn: 202902
2014-03-04 22:13:07 +00:00
Richard Smith
9fdbb897e9
Add support for arbitrary functors to CrashRecoveryContext.
...
llvm-svn: 202895
2014-03-04 21:48:49 +00:00
Ted Kremenek
be5353a070
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
...
llvm-svn: 130885
2011-05-04 23:26:59 +00:00
Ted Kremenek
d582517a58
Properly initialize all fields in CrashReporterCleanupContext. This caused the buildbot failure earlier.
...
llvm-svn: 128071
2011-03-22 04:33:13 +00:00
Ted Kremenek
371ad9a265
Rework CrashRecoveryContextCleanup to provide a simpler way to create cleanup objects, and provide a new cleanup for
...
decrementing reference counts of objects with intrusive reference counts.
llvm-svn: 128055
2011-03-22 01:15:10 +00:00
Ted Kremenek
a462a53e0b
Provide a means for CrashRecovery clients to determine if code is currently running while crash recovery cleanups are being processed.
...
llvm-svn: 128008
2011-03-21 18:38:03 +00:00
Ted Kremenek
c4fa37479a
Tweak CrashRecoveryContextCleanup to provide an easy method for clients to select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant.
...
llvm-svn: 127929
2011-03-19 00:59:37 +00:00
Ted Kremenek
c7c75361fa
Tweak CrashRecoveryContextCleanup::createCleanup() to use the 'delete' cleanup as opposed to the 'destructor' cleanup (reclaims more memory).
...
llvm-svn: 127865
2011-03-18 03:46:21 +00:00
Ted Kremenek
4a4428a5bc
Add new CrashRecoveryContextCleanup subclass: CrashRecoveryContextDeleteCleanup. This deletes the object, not just calls its destructor.
...
llvm-svn: 127855
2011-03-18 03:04:18 +00:00
Ted Kremenek
1a2fa05e5f
Augment CrashRecoveryContext to have registered "cleanup" objects that can be used to release resources during a crash.
...
llvm-svn: 127849
2011-03-18 02:05:11 +00:00
Daniel Dunbar
8f3d8495f5
CrashRecoveryContext: Add RunSafelyOnThread helper function.
...
llvm-svn: 118272
2010-11-05 07:19:09 +00:00
Daniel Dunbar
b5312b0f26
CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
...
llvm-svn: 111308
2010-08-17 22:32:37 +00:00
Daniel Dunbar
0fc35d7284
CrashRecovery: Make CrashRecoveryContext static methods thread safe.
...
llvm-svn: 111307
2010-08-17 22:32:34 +00:00
Daniel Dunbar
4cf25fa76a
Support: Add CrashRecoveryContext helper object.
...
- 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.
llvm-svn: 109586
2010-07-28 15:40:20 +00:00