summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-271-8/+8
| | | | llvm-svn: 114847
* Delete an unused declaration.Dan Gohman2010-09-271-2/+0
| | | | llvm-svn: 114839
* Add support for viewing graphviz graphs with xdot.py.Dan Gohman2010-09-271-0/+26
| | | | llvm-svn: 114832
* Add better support for environment portion of triple. Original patch byDuncan Sands2010-09-161-6/+32
| | | | | | Cameron Esfahani, tweaked to use array_lengthof. llvm-svn: 114073
* Some versions of gcc still warn about "ignoring return value ... declaredDuncan Sands2010-09-161-1/+2
| | | | | | with attribute warn_unused_result" here - suppress the warning harder. llvm-svn: 114072
* Create PTX backend. Patch by Che-Liang Chiou!Nick Lewycky2010-09-071-0/+13
| | | | llvm-svn: 113235
* Add completely hokey binary-and and binary-or operations to ConstantRange andNick Lewycky2010-09-071-0/+26
| | | | | | teach LazyValueInfo to use them. llvm-svn: 113196
* Add a new isSignWrappedSet() method to ConstantRange.Nick Lewycky2010-09-061-3/+15
| | | | | | | | | Fix zeroExtend and signExtend to support empty sets, and to return the smallest possible result set which contains the extension of each element in their inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10) which contains 63446 members. llvm-svn: 113187
* Use the FindProgramByName fallback only with known absolute paths.Dan Gohman2010-09-021-4/+10
| | | | | | | | I wasn't able to convince myself that all GetMainExecutable implementations always return absolute paths; this prevents unexpected behavior in case they ever don't. llvm-svn: 112888
* After some discussion with djg, teach SmallVector to grow from a zeroJohn McCall2010-09-021-1/+1
| | | | | | | capacity and remove the workaround in SmallVector<T,0>. There are some theoretical benefits to a N->2N+1 growth policy anyway. llvm-svn: 112870
* llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.NAKAMURA Takumi2010-09-021-0/+4
| | | | | | bugpoint uses it. llvm-svn: 112803
* Make tool_output_file's raw_ostream instance a member variable insteadDan Gohman2010-09-012-17/+18
| | | | | | | | | | of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. llvm-svn: 112706
* Remove a hack that tries to understand incorrect triples from theDuncan Sands2010-08-301-16/+0
| | | | | | | | | | | Triple class constructor. Only valid triples should now be used inside LLVM - front-ends are now responsable for rejecting or correcting invalid target triples. The Triple::normalize method can be used to straighten out funky triples provided by users. Give this a whirl through the buildbots to see if I caught all places where triples enter LLVM. llvm-svn: 112470
* StringRef::compare_numeric also differed from StringRef::compare for ↵Benjamin Kramer2010-08-261-1/+1
| | | | | | characters > 127. llvm-svn: 112189
* Do unsigned char comparisons in StringRef::compare_lower to be more ↵Benjamin Kramer2010-08-261-4/+4
| | | | | | consistent with compare in corner cases. llvm-svn: 112185
* Use Bits.data() instead of &Bits[0].Dan Gohman2010-08-241-3/+3
| | | | llvm-svn: 111993
* Avoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).Benjamin Kramer2010-08-231-4/+13
| | | | | | | | - Cache used characters in a bitset to reduce memory overhead to just 32 bytes. - On my core2 this code is faster except when the checked string was very short (smaller than the list of delimiters). llvm-svn: 111817
* Update CMake build.Benjamin Kramer2010-08-201-1/+0
| | | | llvm-svn: 111669
* Delete SlowOperationInformer, which is no longer used.Dan Gohman2010-08-201-67/+0
| | | | llvm-svn: 111661
* Make outs() close its file when its stream is destructed, so thatDan Gohman2010-08-201-2/+4
| | | | | | pending output errors are detected. llvm-svn: 111643
* Delete raw_stdout_ostream and raw_stderr_ostream, which are unusedDan Gohman2010-08-201-12/+4
| | | | | | | outside of outs() and errs() themselves, and they don't really need custom classes. llvm-svn: 111642
* Move raw_ostream's Error flag into raw_fd_ostream, as that's the onlyDan Gohman2010-08-201-16/+17
| | | | | | class which is using it. llvm-svn: 111639
* Introduce a new tool_output_file class, which extends raw_ostream withDan Gohman2010-08-202-0/+31
| | | | | | | | functionality that most command-line tools need: ensuring that the output file gets deleted if the tool is interrupted or encounters an error. llvm-svn: 111595
* Do not assert when reading an exponent out of range.Dale Johannesen2010-08-191-0/+1
| | | | llvm-svn: 111534
* Make raw_fd_ostream consider itself the owner of STDOUT_FILENO whenDan Gohman2010-08-181-2/+5
| | | | | | | | | constructed with an output filename of "-". In particular, allow the file descriptor to be closed, and close the file descriptor in the destructor if it hasn't been explicitly closed already, to ensure that any write errors are detected. llvm-svn: 111436
* Tidy.Dan Gohman2010-08-181-5/+4
| | | | llvm-svn: 111432
* Revert r111321. This doesn't fix a problem.Dan Gohman2010-08-181-23/+19
| | | | llvm-svn: 111339
* stomp some more undefined behavior, PR7775.Chris Lattner2010-08-181-6/+7
| | | | llvm-svn: 111337
* 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
OpenPOWER on IntegriCloud