1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

70 Commits

Author SHA1 Message Date
Rafael Espindola
703b03a992 Move PrependMainExecutablePath next to its only user.
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Rafael Espindola
ef0d0d8b0b Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Mikhail Glushenkov
991857f132 Rename FindExecutable to PrependMainExecutablePath.
Makes it more clear that it is just a path manipulation function.

llvm-svn: 118174
2010-11-03 16:14:16 +00:00
Dan Gohman
69a6379472 Print an error as one big string instead of breaking it up.
llvm-svn: 118130
2010-11-03 00:24:33 +00:00
Mikhail Glushenkov
97788c1061 Revert r118057, this is better fixed in appendSuffix itself.
llvm-svn: 118088
2010-11-02 22:18:28 +00:00
Dan Gohman
172e1824d0 Don't append a dot on platforms which don't use exe suffixes.
llvm-svn: 118057
2010-11-02 20:49:48 +00:00
Mikhail Glushenkov
4077e2da6f FindExecutable: remove the executability check.
This makes the behaviour of FindExecutable more consistent across platforms, but
I'm not very happy with the name...

llvm-svn: 118049
2010-11-02 20:32:46 +00:00
Mikhail Glushenkov
7ee0f678cb Remove an unnecessary check and an unnecessary temporary.
llvm-svn: 117583
2010-10-28 19:33:04 +00:00
Dan Gohman
603d00d632 Use the FindProgramByName fallback only with known absolute paths.
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
2010-09-02 22:32:38 +00:00
NAKAMURA Takumi
500a204a62 llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.
bugpoint uses it.

llvm-svn: 112803
2010-09-02 03:46:04 +00:00
Dan Gohman
149ac38d37 Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
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.

llvm-svn: 81568
2009-09-11 20:46:33 +00:00
Chris Lattner
3203639c35 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
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.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Chris Lattner
d6a9cc484b eliminate the ostream version of CheckBitcodeOutputToConsole,
change the raw_ostream one to take the raw_ostream byref instead
of byptr.  Prune #includes, eliminate a use of Streams.h

llvm-svn: 79863
2009-08-23 21:36:09 +00:00
Dan Gohman
ba72f59923 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.

Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.

llvm-svn: 78240
2009-08-05 20:21:17 +00:00
Dan Gohman
5ed272db87 Add a raw_ostream version of CheckBitcodeOutputToConsole.
llvm-svn: 75796
2009-07-15 17:04:50 +00:00
Daniel Dunbar
995f9a8a15 Improve sys::Path::makeAbsolute on Win32.
- Patch by Viktor Kutuzov!

 - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths.

llvm-svn: 75424
2009-07-12 20:23:56 +00:00
Daniel Dunbar
8247f1ffe2 Tweak FindExecutable so that relative executable paths work as well.
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Daniel Dunbar
2b25b9ba77 Fix FindExecutable to work if given an absolute executable path name.
- Patch by Viktor Kutuzov, with tweaks by me.

llvm-svn: 74608
2009-07-01 15:26:13 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Gabor Greif
5f705671e4 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.

llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Bill Wendling
fe0af72bc4 Don't use <sstream> in Streams.h but <iosfwd> instead.
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Bill Wendling
d933b6630c Removed #include <iostream> and replace with llvm_* streams.
llvm-svn: 31927
2006-11-26 10:52:51 +00:00
Reid Spencer
5534b2d505 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Misha Brukman
4fda633c59 Why output multiple strings, let the compiler concatenate them for us for free
llvm-svn: 21845
2005-05-10 22:03:50 +00:00
Misha Brukman
fdc5e95a10 * Order #includes as per style guide
* Combine multiple ``std::cerr <<'' statements into one for simplicity

llvm-svn: 21458
2005-04-22 19:13:22 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Reid Spencer
37f31d4aa1 Make printing a warning message optional in CheckBytecodeOutputToConsole.
llvm-svn: 19240
2005-01-02 00:10:03 +00:00
Reid Spencer
2d73c4d556 Implement a function to print a warning if bytecode output is to be sent to
a terminal/console.

llvm-svn: 19237
2005-01-01 23:56:20 +00:00
Reid Spencer
d1b74b9f5b For PR351:
* Remove unneeded header files.
* Move RedirectFD static function to lib/System/Unix/Program.cpp
* Delete RunProgramWithTimeout, now implemented by
  sys::Program::ExecuteAndWait. RunProgramWithTimeout is now a convenience func.

llvm-svn: 19040
2004-12-19 18:00:09 +00:00
Reid Spencer
734177e5f0 For PR351:
* Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait

llvm-svn: 18927
2004-12-14 04:18:15 +00:00
Reid Spencer
ce8f14e07e For PR351:
* Remove isExecutable as its now implemented by sys::Path::executable
* Make FindExecutable a thin veneer over sys::Program::FindProgramByName.

llvm-svn: 18918
2004-12-13 23:41:37 +00:00
Reid Spencer
3b88b3427b For PR351:
Remove AllocateRWXMemory as it is not used any more in LLVM. The function
has been replaced with sys::Memory::AllocateRWX several months ago.

llvm-svn: 18912
2004-12-13 20:14:30 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
db6b0d2361 Remove linux/solaris specific stuff.
llvm-svn: 15195
2004-07-25 07:34:00 +00:00
Chris Lattner
71a9eec1d3 Get rid of the printout from the low-level system interface
llvm-svn: 15161
2004-07-24 07:50:48 +00:00
Chris Lattner
07dc2875c2 Add support for killing the program if it executes for too long.
llvm-svn: 15158
2004-07-24 07:41:31 +00:00
Misha Brukman
14bac9f37e * Fix file header and name
* Order #includes alphabetically

llvm-svn: 14234
2004-06-18 15:38:49 +00:00
Misha Brukman
86cea2f60a Use the machine-independent method of querying the page size.
llvm-svn: 14233
2004-06-18 15:34:07 +00:00
Misha Brukman
cc25fb9142 Fix spelling, trim empty space, tighten up function header comment.
llvm-svn: 13940
2004-06-02 00:09:46 +00:00
Chris Lattner
928f12aa15 Add support for getting executable memory on Windows. This is actually
much easier than on unix.  :)  The only evil thing is that windows.h defines
a macro named FindExecutable, which collides with one of our names.

The JIT now runs on windows, but it cannot resolve external functions
(like printf) yet.

llvm-svn: 13871
2004-05-28 01:20:58 +00:00
Chris Lattner
2df71158fb Add a new function for the JIT. libsupport is now the only library that
includes mman.h

llvm-svn: 13870
2004-05-28 00:59:40 +00:00
Chris Lattner
fa8fd150ca Changes to make libSupport build on systems that don't have the wait syscall.
llvm-svn: 13806
2004-05-27 01:20:55 +00:00
Chris Lattner
8f8bd7daac Bugpoint was not correctly capturing stderr! This caused it to "find" bugs
that didn't exist, missing the ones that do :(

llvm-svn: 12978
2004-04-16 05:35:58 +00:00
Brian Gaeke
017eb9caf3 Add autoconf support for isStandardOutAConsole ().
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Chris Lattner
2ef79bf28a Add new function, autoconf support required tho
llvm-svn: 12600
2004-04-02 05:04:03 +00:00
Chris Lattner
960a22a097 Remove config wrapper around <cerrno>
llvm-svn: 10747
2004-01-10 19:15:14 +00:00