1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
Chandler Carruth
87f14b4eec Re-sort all of the includes with ./utils/sort_includes.py so that
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.

Also comment and sink the include of "Windows.h" in three .inc files to
match the usage in Memory.inc.

llvm-svn: 198685
2014-01-07 11:48:04 +00:00
Filip Pizlo
0080a77e7a Make the pretty stack trace be an opt-in, rather than opt-out, facility. Enable pretty
stack traces by default if you use PrettyStackTraceProgram, so that existing LLVM-based 
tools will continue to get it without any changes.

llvm-svn: 193971
2013-11-04 02:22:25 +00:00
Filip Pizlo
8196f96988 When LLVM is embedded in a larger application, it's not OK for LLVM to intercept crashes. LLVM already has
the ability to disable this functionality.  This patch exposes it via the C API.

llvm-svn: 193937
2013-11-03 00:29:47 +00:00
Filip Pizlo
9a441082e4 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).

llvm-svn: 190730
2013-09-13 22:59:47 +00:00
Nick Lewycky
6eeb281e09 Add a new watchdog timer interface. The interface does not permit handling timeouts, so
it's only really useful if you're going to crash anyways. Use it in the pretty stack trace
printer to kill the compiler if we hang while printing the stack trace.

llvm-svn: 177962
2013-03-26 01:27:52 +00:00
Chandler Carruth
a490793037 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Eric Christopher
29ebd25c99 Add more initializers to quiet a clang warning.
llvm-svn: 141163
2011-10-05 05:00:26 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Jeffrey Yasskin
a199652a3e Change all self assignments X=X to (void)X, so that we can turn on a
new gcc warning that complains on self-assignments and
self-initializations.

llvm-svn: 122458
2010-12-23 00:58:24 +00:00
Eric Christopher
25f7b89a9e Apparently OS X 10.4 doesn't have __crashreporter_info__.
Try to fix building on the wayback machine.

llvm-svn: 120801
2010-12-03 07:45:22 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Eric Christopher
bdc651b7c3 Fix a couple of warnings.
llvm-svn: 110527
2010-08-08 00:00:34 +00:00
Eric Christopher
40f544b62c Fix thinko.
llvm-svn: 107042
2010-06-28 18:33:48 +00:00
Eric Christopher
bb7e1bfb0c Pull in the libCrashReporterClient.a information with a warning comment.
Remove library check and regenerate configure.

llvm-svn: 107028
2010-06-28 18:25:51 +00:00
Eric Christopher
835fc55fd0 Look for and use a different darwin crash reporter library.
llvm-svn: 106576
2010-06-22 21:01:04 +00:00
Daniel Dunbar
38460e2596 Fix __crashreport_info__ declaration.
llvm-svn: 104300
2010-05-20 23:50:19 +00:00
Daniel Dunbar
2cf5eb67b4 Switch to SmallString::str from SmallString::c_str, and remove
SmallString::c_str.

llvm-svn: 79456
2009-08-19 20:07:03 +00:00
Chris Lattner
a9fcfe3d18 add a knob to turn off PrettyStackTrace globally. Patch by Zoltan
Varga!

llvm-svn: 75897
2009-07-16 06:17:45 +00:00
Owen Anderson
5417ad7e3b Support thread-local pretty stack traces.
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Dan Gohman
18daca0895 Now that errs() is properly non-buffered, there's no need to
explicitly flush it.

llvm-svn: 67526
2009-03-23 15:57:19 +00:00
Dan Gohman
23d7aa62d4 Use c_str() to force the string to be nul-terminated.
llvm-svn: 66279
2009-03-06 18:13:15 +00:00
Chris Lattner
bf3dee4ec7 on apple systems, integrate nicely with crash reporter.
llvm-svn: 66264
2009-03-06 07:19:54 +00:00
Chris Lattner
c4f40d1f53 Daniel wanted the stack printed upside down. Perhaps he
feels a kinship to machine stacks that grow down.  Now we get
stuff like this:

Stack dump:
0.	Program arguments: clang clang_crash_Iw2Osj.mi 
1.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: parsing function body '_mm_cvtpi16_ps'
2.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: in compound statement ('{}')
Abort

llvm-svn: 66145
2009-03-05 07:03:49 +00:00
Chris Lattner
982c3491ff indicate what the program args line is.
llvm-svn: 66144
2009-03-05 06:51:42 +00:00
Chris Lattner
84424b02bb add some helper classes for building light-weight symbolic stack traces
that get printed when a program crashes.  This is the first step of many.

llvm-svn: 66076
2009-03-04 21:40:23 +00:00