Torok Edwin
5da9f51d1e
Add support for outputting ANSI colors to raw_fd_ostream.
...
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Mike Stump
5447116cbb
Add support for letting the client choose different flavors of NaNs. Testcase to be
...
added in clang.
llvm-svn: 72606
2009-05-30 03:49:43 +00:00
Bill Wendling
8235a05c1a
Untabification.
...
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Douglas Gregor
4d8d0356d0
Minor fix for CMake build system
...
llvm-svn: 72480
2009-05-27 16:52:17 +00:00
Daniel Dunbar
aa01cbb890
Add llvm::triple constructor from arch, vendor, os strings, and recognize
...
DragonFly OS type.
llvm-svn: 72242
2009-05-22 02:24:11 +00:00
Evan Cheng
dd4f34ed9a
80 column violation.
...
llvm-svn: 72235
2009-05-21 23:47:47 +00:00
Owen Anderson
4f6709ebd6
Have llvm_start_multithreaded return a bool indicating whether multithreaded
...
initialization succeeded or not, rather than just asserting.
llvm-svn: 72182
2009-05-20 21:03:06 +00:00
Owen Anderson
47460293cf
Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode. Provide double-check locking
...
initialization of ManagedStatic's when running in thread-safe mode.
llvm-svn: 72151
2009-05-20 00:39:20 +00:00
Eli Friedman
573333530f
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
...
It doesn't matter for piped input, but it's annoying when typing at the
console.
llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Mike Stump
329994e9d4
Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
...
Radar 6867696
llvm-svn: 71750
2009-05-14 00:03:51 +00:00
Mike Stump
6666fa7a2c
Fix whitespacing (space after switch).
...
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jay Foad
9768cabf4a
Move helper functions for optimizing division by constant into the APInt
...
class.
llvm-svn: 70488
2009-04-30 10:15:35 +00:00
Bill Wendling
3f4c6171d1
Add support for a character after a command line option. Like '-Os'.
...
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Chris Lattner
d68b203337
Fix PR4040: APInt's string constructor is too strict
...
patch by Jeff Yasskin!
llvm-svn: 70058
2009-04-25 18:34:04 +00:00
Douglas Gregor
bdeba00c46
Make all raw_ostreams support the tell() function.
...
llvm-svn: 69583
2009-04-20 07:34:17 +00:00
Chris Lattner
b46ad5bbba
teach EscapeString and UnescapeString to handle ".
...
llvm-svn: 69211
2009-04-15 20:12:52 +00:00
Chris Lattner
fc47fb0629
Remove AllowInverse: it leaks memory and is not the right
...
abstraction for CommandLine.
llvm-svn: 68588
2009-04-08 03:43:51 +00:00
Mikhail Glushenkov
87b0df5b28
Fix build on Linux.
...
llvm-svn: 68269
2009-04-02 01:11:37 +00:00
Daniel Dunbar
588d3d1fd6
Add llvm::Triple class for abstracting access to target triples.
...
- The code is silly, I'm just amusing myself. Rewrite to be efficient
if you like. :)
Also, if you wish to debate the proper names of the triple components
I'm all ears.
llvm-svn: 68252
2009-04-01 21:53:23 +00:00
Dan Gohman
770f4158e5
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Misha Brukman
ea884c9e5e
* Fixed spelling of `invertible'
...
* Simplified if statement
llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Chris Lattner
601a4d8c70
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Dale Johannesen
34123aba43
Fix internal representation of fp80 to be the
...
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.
llvm-svn: 67562
2009-03-23 21:16:53 +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
Duncan Sands
45d4adde66
Fix comment typo.
...
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Daniel Dunbar
7c9dba0950
Add BUILTIN_EXPECT Support/Compiler macro.
...
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Daniel Dunbar
2cc1ec75e1
raw_ostream: Put all exceptional conditions in raw_ostream::write
...
under a single branch.
Also, add a FIXME for formatted output.
llvm-svn: 67069
2009-03-17 01:36:56 +00:00
Daniel Dunbar
b04be1838d
raw_ostream: Rework implementation of unbuffered streams so outputting
...
a single character requires only one branch to follow slow path.
- Never use a buffer when writing on an unbuffered stream.
- Move default buffer size to header.
llvm-svn: 67066
2009-03-17 01:13:35 +00:00
Daniel Dunbar
2062a58347
raw_ostream: Replace flush_impl with write_impl, which takes data to
...
write as arguments.
- Add raw_ostream::GetNumBytesInBuffer.
- Privatize buffer pointers.
- Get rid of slow and unnecessary code for writing out large strings.
llvm-svn: 67060
2009-03-16 23:29:31 +00:00
Daniel Dunbar
c2d554fe0b
raw_ostream: Lift out flush_nonempty.
...
- Flush a known non-empty buffers; enforces the interface to
flush_impl and kills off HandleFlush (which I saw no reason to be
an inline method, Chris?).
- Clarify invariant that flush_impl is only called with OutBufCur >
OutBufStart.
- This also cleary collects all places where we have to deal with the
buffer possibly not existing.
- A few more comments and fixing the unbuffered behavior remain in
this commit sequence.
llvm-svn: 67057
2009-03-16 22:55:06 +00:00
Daniel Dunbar
5ef319c7d7
Make raw_ostream::operator<<(const void *) fast; it doesn't matter but
...
it is easy.
llvm-svn: 67054
2009-03-16 22:08:44 +00:00
Daniel Dunbar
c64fdabf4f
Add slow path for single character write, and use exclusively for
...
single characters writes outside of the fast path in raw_ostream.h
llvm-svn: 67053
2009-03-16 22:00:17 +00:00
Stuart Hastings
4ee393a21a
Fix a hashing bug in APInt. A certain pathological testcase (too
...
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GCC
takes less than one second). This hash function is more complex
(about 35 instructions on x86) than what Chris wanted, but I expect it
will be well-behaved with arbitrary inputs.
Thank you to everyone who responded to my previous request for advice.
llvm-svn: 66962
2009-03-13 21:51:13 +00:00
Chris Lattner
6f7628bd8e
just initialize the first element, we don't need to set the rest to zeros.
...
llvm-svn: 66850
2009-03-13 00:24:01 +00:00
Chris Lattner
99b48e57ba
Eliminate a 9640 byte static mutable initialized data item by moving it
...
to the stack. This shrinks all llvm tools by 9k, and improves reentrancy.
llvm-svn: 66847
2009-03-13 00:03:51 +00:00
Chris Lattner
f835ec9a9d
static functions don't need an anonymous namespace.
...
llvm-svn: 66845
2009-03-12 23:59:55 +00:00
Daniel Dunbar
b60a074565
PR3478: raw_ostream should not buffer stderr
...
- Add unbuffered flag to raw_ostream, forwarded by raw_fd_ostream and
used by raw_stderr_ostream.
llvm-svn: 66545
2009-03-10 16:21:55 +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
Duncan Sands
e53256c66c
Add missing file.
...
llvm-svn: 66160
2009-03-05 09:19:13 +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
Devang Patel
25f2741ae9
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Cedric Venet
48be6b5e15
Unbreak the build on win32.
...
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Evan Cheng
ec9d3c889f
Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
...
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Evan Cheng
643730a194
If new[] fails, return 0 rather then trying to dereference a null pointer.
...
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky
f273659759
Add an API for strings with possible NULLs in the middle. Refactor the other
...
two AddString methods to use it.
llvm-svn: 64005
2009-02-07 04:57:08 +00:00
Mike Stump
4c8ca99bb1
Improve -fno-opt style option processing to not require an extra
...
option to make the -fno- form on the option. We also document the new
form in the CommandLine documentation.
llvm-svn: 63559
2009-02-02 22:48:49 +00:00
Mike Stump
a0b25f92ce
Add opposite_of and inverse_opt to support -fno- style options. This
...
is necessary for eventual gcc commmand line compatibility.
llvm-svn: 63384
2009-01-30 08:19:46 +00:00