aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Add support for outputting ANSI colors to raw_fd_ostream.Torok Edwin2009-06-041-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72854 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for letting the client choose different flavors of NaNs. ↵Mike Stump2009-05-301-6/+12
| | | | | | | | | Testcase to be added in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72606 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabification.Bill Wendling2009-05-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor fix for CMake build systemDouglas Gregor2009-05-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72480 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::triple constructor from arch, vendor, os strings, and recognizeDaniel Dunbar2009-05-221-0/+3
| | | | | | | DragonFly OS type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72242 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 column violation.Evan Cheng2009-05-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72235 91177308-0d34-0410-b5e6-96231b3b80d8
* Have llvm_start_multithreaded return a bool indicating whether multithreadedOwen Anderson2009-05-201-2/+3
| | | | | | | initialization succeeded or not, rather than just asserting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72182 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm_start_multithreaded(), which starts up the LLVM internals in ↵Owen Anderson2009-05-201-8/+45
| | | | | | | | | thread-safe mode. Provide double-check locking initialization of ManagedStatic's when running in thread-safe mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72151 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF. Eli Friedman2009-05-181-3/+6
| | | | | | | | | It doesn't matter for piped input, but it's annoying when typing at the console. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71998 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.Mike Stump2009-05-141-0/+2
| | | | | | | Radar 6867696 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71750 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespacing (space after switch).Mike Stump2009-05-133-33/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71738 91177308-0d34-0410-b5e6-96231b3b80d8
* Move helper functions for optimizing division by constant into the APIntJay Foad2009-04-301-0/+92
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70488 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a character after a command line option. Like '-Os'.Bill Wendling2009-04-291-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70437 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4040: APInt's string constructor is too strictChris Lattner2009-04-251-7/+9
| | | | | | | patch by Jeff Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70058 91177308-0d34-0410-b5e6-96231b3b80d8
* Make all raw_ostreams support the tell() function.Douglas Gregor2009-04-201-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69583 91177308-0d34-0410-b5e6-96231b3b80d8
* teach EscapeString and UnescapeString to handle ".Chris Lattner2009-04-151-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69211 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AllowInverse: it leaks memory and is not the rightChris Lattner2009-04-081-21/+0
| | | | | | | abstraction for CommandLine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68588 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build on Linux.Mikhail Glushenkov2009-04-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68269 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Triple class for abstracting access to target triples.Daniel Dunbar2009-04-011-0/+183
| | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68252 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CHAR_BIT instead of hard-coding 8 in several places where itDan Gohman2009-04-011-3/+3
| | | | | | | | is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fixed spelling of `invertible'Misha Brukman2009-04-011-2/+2
| | | | | | | * Simplified if statement git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68163 91177308-0d34-0410-b5e6-96231b3b80d8
* move a large method out of line.Chris Lattner2009-03-281-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67892 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-8/+6
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67562 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-1/+0
| | | | | | | explicitly flush it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67526 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Duncan Sands2009-03-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67302 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BUILTIN_EXPECT Support/Compiler macro.Daniel Dunbar2009-03-171-1/+2
| | | | | | | | | | - Use for exceptional buffer conditions in raw_ostream:write to shave off a cycle or two. - Please rename if you have a better one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67103 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream: Put all exceptional conditions in raw_ostream::writeDaniel Dunbar2009-03-171-18/+30
| | | | | | | | | under a single branch. Also, add a FIXME for formatted output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67069 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream: Rework implementation of unbuffered streams so outputtingDaniel Dunbar2009-03-171-4/+12
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67066 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream: Replace flush_impl with write_impl, which takes data toDaniel Dunbar2009-03-161-32/+15
| | | | | | | | | | write as arguments. - Add raw_ostream::GetNumBytesInBuffer. - Privatize buffer pointers. - Get rid of slow and unnecessary code for writing out large strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67060 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream: Lift out flush_nonempty.Daniel Dunbar2009-03-161-20/+21
| | | | | | | | | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67057 91177308-0d34-0410-b5e6-96231b3b80d8
* Make raw_ostream::operator<<(const void *) fast; it doesn't matter butDaniel Dunbar2009-03-161-2/+19
| | | | | | | it is easy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add slow path for single character write, and use exclusively forDaniel Dunbar2009-03-161-8/+8
| | | | | | | single characters writes outside of the fast path in raw_ostream.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67053 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a hashing bug in APInt. A certain pathological testcase (tooStuart Hastings2009-03-131-7/+85
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66962 91177308-0d34-0410-b5e6-96231b3b80d8
* just initialize the first element, we don't need to set the rest to zeros.Chris Lattner2009-03-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66850 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate a 9640 byte static mutable initialized data item by moving itChris Lattner2009-03-131-2/+2
| | | | | | | to the stack. This shrinks all llvm tools by 9k, and improves reentrancy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66847 91177308-0d34-0410-b5e6-96231b3b80d8
* static functions don't need an anonymous namespace.Chris Lattner2009-03-121-373/+371
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66845 91177308-0d34-0410-b5e6-96231b3b80d8
* PR3478: raw_ostream should not buffer stderrDaniel Dunbar2009-03-101-1/+5
| | | | | | | | - Add unbuffered flag to raw_ostream, forwarded by raw_fd_ostream and used by raw_stderr_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66545 91177308-0d34-0410-b5e6-96231b3b80d8
* Use c_str() to force the string to be nul-terminated.Dan Gohman2009-03-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66279 91177308-0d34-0410-b5e6-96231b3b80d8
* on apple systems, integrate nicely with crash reporter.Chris Lattner2009-03-061-4/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66264 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing file.Duncan Sands2009-03-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66160 91177308-0d34-0410-b5e6-96231b3b80d8
* Daniel wanted the stack printed upside down. Perhaps heChris Lattner2009-03-051-6/+14
| | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66145 91177308-0d34-0410-b5e6-96231b3b80d8
* indicate what the program args line is.Chris Lattner2009-03-051-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66144 91177308-0d34-0410-b5e6-96231b3b80d8
* add some helper classes for building light-weight symbolic stack tracesChris Lattner2009-03-041-0/+69
| | | | | | | that get printed when a program crashes. This is the first step of many. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66076 91177308-0d34-0410-b5e6-96231b3b80d8
* The debugger sometimes lookup dynamically in the runtime to find ivar info ↵Devang Patel2009-02-171-0/+2
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build on win32.Cedric Venet2009-02-141-1/+1
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64554 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch from new[] + delete[] to malloc + free since llvm does not catch C++ ↵Evan Cheng2009-02-131-3/+3
| | | | | | exceptions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64448 91177308-0d34-0410-b5e6-96231b3b80d8
* If new[] fails, return 0 rather then trying to dereference a null pointer.Evan Cheng2009-02-131-3/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64444 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an API for strings with possible NULLs in the middle. Refactor the otherNick Lewycky2009-02-071-37/+8
| | | | | | | two AddString methods to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64005 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve -fno-opt style option processing to not require an extraMike Stump2009-02-021-19/+2
| | | | | | | | option to make the -fno- form on the option. We also document the new form in the CommandLine documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63559 91177308-0d34-0410-b5e6-96231b3b80d8
* Add opposite_of and inverse_opt to support -fno- style options. ThisMike Stump2009-01-301-1/+21
| | | | | | | is necessary for eventual gcc commmand line compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63384 91177308-0d34-0410-b5e6-96231b3b80d8