summaryrefslogtreecommitdiff
path: root/lib/Support
Commit message (Collapse)AuthorAge
* Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn'tDan Gohman2009-09-11
| | | | | | | | | | | | | | | | working. To support this, add an is_displayed() function to raw_ostream, and generalize Process::StandardOutIsDisplayed and friends in order to support it. Also, call RemoveFileOnSignal before creating a file instead of after, so that the file isn't left behind if the program is interrupted between when the file is created and RemoveFileOnSignal is called. While here, add a -S to llvm-extract and port it to IRReader so that it supports assembly input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
* canonicalize namespace gymnasticsChris Lattner2009-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81402 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment re: clang dependency.Daniel Dunbar2009-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81393 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an abstract superclass, MCDisassembler, forSean Callanan2009-09-09
| | | | | | | | | | | | | | all disassemblers. Modified the MemoryObject to support 64-bit address spaces, regardless of the LLVM process's address width. Modified the Target class to allow extraction of a MCDisassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81392 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the memory range is writable before memset'ing it.Evan Cheng2009-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81308 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Triple::getArchTypeForDarwinArchName, which converts a "Darwin" architectureDaniel Dunbar2009-09-08
| | | | | | | | name (e.g. "ppc") to the appropriate constant. Also, StringRefize additional Triple constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81274 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve JIT error message for users crazy enough to use -march with JIT, andDaniel Dunbar2009-09-08
| | | | | | mention -version in messages about missing targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81272 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix may-be-used-uninitialized warning.Daniel Dunbar2009-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81223 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid warnings if assertions are off.Duncan Sands2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81127 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some not-really-used variables, as warnedDuncan Sands2009-09-06
| | | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81115 91177308-0d34-0410-b5e6-96231b3b80d8
* More MSVC warning fixes:Benjamin Kramer2009-09-06
| | | | | | | | 1. DUPMAX is defined in regcomp.c, no need to redefine it in regutils. 2. MSVC doesn't like snprintf, use _snprintf instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81114 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove splint hints to silence warnings from ICC and MSVC.Benjamin Kramer2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81108 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unused variables and methods warned about byDuncan Sands2009-09-06
| | | | | | | icc (#177, partial). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8
* Show derived host triple in --version.Daniel Dunbar2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80855 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake files.Ted Kremenek2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80680 91177308-0d34-0410-b5e6-96231b3b80d8
* Add triple parsing support for XCore.Richard Osborne2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80629 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some possible-use-of-uninitialized warnings.Daniel Dunbar2009-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80515 91177308-0d34-0410-b5e6-96231b3b80d8
* Add regular expression matching support, based on OpenBSD regexec()/regcomp()Torok Edwin2009-08-30
| | | | | | | implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80493 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-25
| | | | | | | | | | | | | | | | | This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: updated list of source files.Oscar Fuentes2009-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79959 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Triple::getArchTypePrefix for getting the intrinsic prefix for anDaniel Dunbar2009-08-24
| | | | | | identifier architecture. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79906 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly account for the Spaces array nul terminator. Thanks Chris!Dan Gohman2009-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79894 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream::indent is used for PadToColumn which often prints moreDan Gohman2009-08-24
| | | | | | | than 16 spaces. Make the Spaces array wide enough to handle common cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79890 91177308-0d34-0410-b5e6-96231b3b80d8
* split raw_os_ostream out to its own header and implementation file. ThisChris Lattner2009-08-24
| | | | | | | | means that raw_ostream no longer has to #include <iosfwd>. Nothing in llvm should use raw_os_ostream.h, but llvm-gcc and some unit tests do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79886 91177308-0d34-0410-b5e6-96231b3b80d8
* prune the #includes in raw_ostream.h by moving a Chris Lattner2009-08-24
| | | | | | | | member out of line. ftostr is not particularly speedy, so that method is presumably not perf sensitive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build for HAVE_GV platforms.Dan Gohman2009-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79883 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Updated library dependencies and list of source files.Oscar Fuentes2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79876 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the dead std::ostream APInt inserterChris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79875 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some problems with my last patch which happen when one ofChris Lattner2009-08-23
| | | | | | | | | (HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \ HAVE_TWOPI || HAVE_CIRCO)) are true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79872 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/Support/Streams.h is now dead, zap it.Chris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79865 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the ostream version of CheckBitcodeOutputToConsole,Chris Lattner2009-08-23
| | | | | | | | change the raw_ostream one to take the raw_ostream byref instead of byptr. Prune #includes, eliminate a use of Streams.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79863 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix off-by-one in llvm::Format::print.Daniel Dunbar2009-08-23
| | | | | | | | | | | | | - This also shortens the Format.h implementation, and uses the print buffer fully (it was wasting a character). - This manifested as llvm-test failures, because one side effect was that raw_ostream would write garbage '\x00' values into the output stream if it happened that the string was at the end of the buffer. This meant that grep would report 'Binary file matches', which meant the silly pattern matching llvm-test eventually does would fail. Cute. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79862 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up #includes.Chris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79857 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79852 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove uses of Streams.h from CommandLine.cpp, fix some whitespace and other ↵Benjamin Kramer2009-08-23
| | | | | | minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79847 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows build.Benjamin Kramer2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79845 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some refactos for iostream changes (in -Asserts mode).Daniel Dunbar2009-08-23
| | | | | | - The world needs better C++ refactoring tools, can I get an Amen!? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79843 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79842 91177308-0d34-0410-b5e6-96231b3b80d8
* convert LoopInfo.h and GraphWriter.h to use raw_ostreamChris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79836 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate DOUT and make Debug.h not include Streams.h anymore, woo!Chris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79835 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-23
| | | | | | | update all code that this affects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
* switch formattedstream to use raw_ostream::indent. This eliminatesChris Lattner2009-08-22
| | | | | | | the weird MAX_COLUMN_PAD limitation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79785 91177308-0d34-0410-b5e6-96231b3b80d8
* add a raw_ostream::indent method, to be used like:Chris Lattner2009-08-22
| | | | | | | | | OS.indent(i) << "whatever"; people seem to like indenting things ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79784 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Anton Korobeynikov2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79688 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement APInt <-> APFloat conversion for IEEE 128-bit floats.Anton Korobeynikov2009-08-21
| | | | | | This fixes PR2555 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79677 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the APInt function getDigit.Erick Tryzelaar2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79602 91177308-0d34-0410-b5e6-96231b3b80d8
* Update error messages for '+'. Fix grammar and make the twoEric Christopher2009-08-21
| | | | | | | negative checks resemble each other. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79595 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix trailing whitespace and 80-col violation.Eric Christopher2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79594 91177308-0d34-0410-b5e6-96231b3b80d8