summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* include config.h to get config params, hopefully unbreaking mingw builder.Chris Lattner2010-08-171-0/+1
| | | | llvm-svn: 111325
* Fix the rest of rdar://8318441 which happens when a raw_fd_ostreamChris Lattner2010-08-171-19/+23
| | | | | | | | | | (e.g. errs()) fails in close() due to (e.g.) a broken pipe. As previously written, the had_error() flag would get set and then the raw_ostream dtor would report a fatal error. There is nothing the client can do about this and we have no way to report the error, so just eat it. llvm-svn: 111321
* report_fatal_error can't use errs(), because errs() can call Chris Lattner2010-08-171-8/+26
| | | | | | | into report_fatal_error. Just blast the string to stderr with write(2) and hope for the best! Part of rdar://8318441 llvm-svn: 111320
* CrashRecovery: Clear the current context on the first crash, to avoid ↵Daniel Dunbar2010-08-171-0/+4
| | | | | | re-entering it if the cleanup code crashes. llvm-svn: 111309
* CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find ↵Daniel Dunbar2010-08-171-2/+12
| | | | | | the active context from anywhere. llvm-svn: 111308
* CrashRecovery: Make CrashRecoveryContext static methods thread safe.Daniel Dunbar2010-08-171-0/+10
| | | | llvm-svn: 111307
* remove trailing whitespaceJim Grosbach2010-08-171-7/+7
| | | | llvm-svn: 111254
* Add hooks to FoldingSetTrait to allow specializations to provideDan Gohman2010-08-161-35/+52
| | | | | | | | implementations of equality comparison and hash computation. This can be used to optimize node lookup by avoiding creating lots of temporary ID values just for hashing and comparison purposes. llvm-svn: 111130
* Reverse the order of GetNodeProfile's arguments, for consistencyDan Gohman2010-08-161-4/+4
| | | | | | with FoldingSetTrait::Profile. llvm-svn: 111127
* Add a 'normalize' method to the Triple class, which takes a mucked upDuncan Sands2010-08-121-63/+196
| | | | | | | | | | | | | | | target triple and straightens it out. This does less than gcc's script config.sub, for example it turns i386-mingw32 into i386--mingw32 not i386-pc-mingw32, but it does a decent job of turning funky triples into something that the rest of the Triple class can understand. The plan is to use this to canonicalize triple's when they are first provided by users, and have the rest of LLVM only deal with canonical triples. Once this is done the special case workarounds in the Triple constructor can be removed, making the class more regular and easier to use. The comments and unittests for the Triple class are already adjusted in this patch appropriately for this brave new world of increased uniformity. llvm-svn: 110909
* Clean up ConstantRange a bit:Nick Lewycky2010-08-111-78/+46
| | | | | | | | | - remove ashr which never worked. - fix lshr and shl and add tests. - remove dead function "intersect1Wrapped". - add a new sub method to subtract ranges, with test. llvm-svn: 110861
* Fix a couple of warnings.Eric Christopher2010-08-081-2/+3
| | | | llvm-svn: 110527
* Roll back my last two commits, valgrind complains.Benjamin Kramer2010-08-071-3/+2
| | | | llvm-svn: 110518
* Kill rarely used std::sort.Benjamin Kramer2010-08-071-2/+3
| | | | llvm-svn: 110516
* Remove layering violation.Owen Anderson2010-08-071-2/+0
| | | | llvm-svn: 110505
* Add an inverse() method to ConstantRange.Owen Anderson2010-08-071-0/+11
| | | | llvm-svn: 110504
* Add a convenience constructor.Owen Anderson2010-08-071-0/+3
| | | | llvm-svn: 110493
* avoid undef behavior on minint, fixing PR7783.Chris Lattner2010-08-031-2/+3
| | | | llvm-svn: 110114
* Fix -Wmissing-field-initializers warnings.Daniel Dunbar2010-07-301-15/+5
| | | | llvm-svn: 109872
* CrashRecovery: Use ThreadLocal::erase() instead of set(0).Daniel Dunbar2010-07-291-1/+1
| | | | llvm-svn: 109752
* Make sure to include config.h, to pickup LLVM_ON_WIN32.Daniel Dunbar2010-07-291-0/+1
| | | | llvm-svn: 109721
* CrashRecoveryContext: Add a simple POSIX implementation.Daniel Dunbar2010-07-291-1/+102
| | | | | | | | - 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. llvm-svn: 109717
* Unbreak my CMake build, say you'll compile for me again...Douglas Gregor2010-07-281-0/+1
| | | | llvm-svn: 109598
* Support: Add CrashRecoveryContext helper object.Daniel Dunbar2010-07-281-0/+88
| | | | | | | | | - 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
* Don't pass StringRef by reference.Benjamin Kramer2010-07-144-11/+10
| | | | llvm-svn: 108366
* add some triple for minix, patch by Kees van Reeuwijk from PR7582Chris Lattner2010-07-072-2/+5
| | | | llvm-svn: 107785
* Rather than giving SmallPtrSetImpl a member field SmallArray which is magicallyDuncan Sands2010-06-301-3/+6
| | | | | | | | | | | | | | | | replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a pointer to the start of the storage, and have SmallPtrSet pass in the value to use. This has the disadvantage that SmallPtrSet becomes bigger by one pointer. It has the advantage that it no longer uses tricky C++ rules, and is clearly correct while I'm not sure the previous version was. This was inspired by g++-4.6 pointing out that SmallPtrSetImpl was writing off the end of SmallArray, which it was. Since SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to valid memory. But it was writing off the end of the declared array type - sounds kind of dubious to me, like it sounded dubious to g++-4.6. Maybe g++-4.6 is wrong and this construct is perfectly valid and correctly compiled by all compilers, but I think it is better to avoid the whole can of worms by avoiding this construct. llvm-svn: 107285
* Fix thinko.Eric Christopher2010-06-281-2/+4
| | | | llvm-svn: 107042
* Pull in the libCrashReporterClient.a information with a warning comment.Eric Christopher2010-06-281-2/+9
| | | | | | Remove library check and regenerate configure. llvm-svn: 107028
* Rewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.Benjamin Kramer2010-06-251-15/+15
| | | | llvm-svn: 106856
* Bring back the empty vector workaround I removed in r106839. Looks like MSVC ↵Benjamin Kramer2010-06-251-1/+2
| | | | | | needs it. llvm-svn: 106841
* Tweak MemoryBuffer to allocate the class itself, the name and possibly theBenjamin Kramer2010-06-251-70/+60
| | | | | | | | | | buffer in the same chunk of memory. 2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every MemoryBuffer pointing to a memory range translate into 20% less mallocs on clang -cc1 -Eonly Cocoa_h.m. llvm-svn: 106839
* Add overloads for getFile and getFileOrSTDIN which take a const char *Dan Gohman2010-06-241-3/+17
| | | | | | | instead of a StringRef, avoiding the need to copy the string in the common case. llvm-svn: 106754
* Look for and use a different darwin crash reporter library.Eric Christopher2010-06-221-1/+11
| | | | llvm-svn: 106576
* Add an explicit keyword.Dan Gohman2010-06-221-1/+1
| | | | llvm-svn: 106538
* Use calloc instead of new/memset, it is more efficient when the set is very ↵Benjamin Kramer2010-06-191-6/+14
| | | | | | large. llvm-svn: 106390
* Give NamedRegionTimer an Enabled flag, allowing all its clients toDan Gohman2010-06-181-4/+6
| | | | | | | | | | | | | | | | | | | | switch from this: if (TimePassesIsEnabled) { NamedRegionTimer T(Name, GroupName); do_something(); } else { do_something(); // duplicate the code, this time without a timer! } to this: { NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled); do_something(); } llvm-svn: 106285
* Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and Jason Molenda2010-06-171-212/+299
| | | | | | | | | DW_OP_breg[0..31] to Dwarf.h. Add "DW_" prefix to the llvm::dwarf::*String methods which did not already have them in Dwarf.cpp. llvm-svn: 106197
* fpcmp: Fix bug where fpcmp wouldn't early exit when files obviously differ andDaniel Dunbar2010-06-151-9/+9
| | | | | | no tolerance is set. llvm-svn: 106033
* fpcmp: Fix a possible infinite loop when comparing something like:Daniel Dunbar2010-06-151-0/+8
| | | | | | | | | 1..19 ok to 1..20 o k (yes, the odd space is necessary). llvm-svn: 106032
* Use const_iterator where appropriate.Daniel Dunbar2010-06-081-1/+1
| | | | llvm-svn: 105620
* DeltaAlgorithm: Tweak split to split by first/second half instead of ↵Daniel Dunbar2010-06-081-2/+2
| | | | | | even/odd, since adjacent changes are more likely to be related. llvm-svn: 105613
* ADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on ↵Daniel Dunbar2010-06-082-0/+358
| | | | | | | | top of the standard 'delta debugging' algorithm. - This can give substantial speedups in the delta process for inputs we can construct dependency information for. llvm-svn: 105612
* Use realloc instead of malloc+memcpy when growing a POD SmallVector. A smartBenjamin Kramer2010-06-081-9/+12
| | | | | | | realloc implementation can try to expand the allocated memory block in-place, avoiding the copy. llvm-svn: 105605
* Minor code simplification.Dan Gohman2010-05-281-2/+1
| | | | llvm-svn: 104959
* Fix a redundant-return warning.Dan Gohman2010-05-281-1/+2
| | | | llvm-svn: 104958
* Add basic error checking to MemoryBuffer::getSTDIN.Dan Gohman2010-05-271-2/+7
| | | | llvm-svn: 104855
* Add StringRef::compare_numeric and use it to sort TableGen register records.Jakob Stoklund Olesen2010-05-261-0/+28
| | | | | | | This means that our Registers are now ordered R7, R8, R9, R10, R12, ... Not R1, R10, R11, R12, R2, R3, ... llvm-svn: 104745
* Fix __crashreport_info__ declaration.Daniel Dunbar2010-05-201-2/+2
| | | | llvm-svn: 104300
* Add a comment explaining why this code uses Append mode.Dan Gohman2010-05-191-0/+4
| | | | llvm-svn: 104095
OpenPOWER on IntegriCloud