1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
Commit Graph

300 Commits

Author SHA1 Message Date
Rafael Espindola
fd7a61257b typos
llvm-svn: 118376
2010-11-07 13:48:10 +00:00
Rafael Espindola
49a9710db0 Add method for checking if a path is a symbolic link.
llvm-svn: 118367
2010-11-07 04:36:50 +00:00
Daniel Dunbar
06d64897d3 System: Add llvm_execute_on_thread, which does what it says.
- Primarily useful for running some code with a specified stack size, when
   pthreads are available.

llvm-svn: 118222
2010-11-04 01:26:25 +00:00
Mikhail Glushenkov
79047e7eb3 appendSuffix: don't append a dot when the suffix is empty.
Additionally, move the implementation of appendSuffix to Path.cpp: it is
platform-independent.

llvm-svn: 118089
2010-11-02 22:18:37 +00:00
Mikhail Glushenkov
b1d2a5ac52 Make FindProgramByName return paths with slashes unmodified on Windows.
This makes its behaviour more consistent across platforms.

llvm-svn: 118048
2010-11-02 20:32:39 +00:00
Mikhail Glushenkov
c86f1d26e9 Path: Add GetEXESuffix() to complement GetDLLSuffix().
llvm-svn: 118042
2010-11-02 20:32:26 +00:00
Dan Gohman
b27988e5bd Make Program::Wait differentiate execution failure due to the file
being not found from the file being not executable. 

llvm-svn: 117664
2010-10-29 16:54:25 +00:00
Mikhail Glushenkov
6aa7a4c180 80-col violations.
llvm-svn: 117580
2010-10-28 19:32:47 +00:00
Dan Gohman
68f316a93c Clang's #include handling apparently doesn't work for libstdc++'s
fenv.h. See PR6907 for details. Work around this in FEnv.h to fix
the seflhost build.

llvm-svn: 116256
2010-10-11 22:30:59 +00:00
Michael J. Spencer
0888ccaa19 System: Add SwapByteOrder and update Support/MathExtras.h to use it.
This time correctly.

llvm-svn: 116247
2010-10-11 21:56:16 +00:00
Michael J. Spencer
0af3659b5d Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."
This reverts commit 116234.

It compiled just fine with MSVC and clang...

llvm-svn: 116242
2010-10-11 21:39:24 +00:00
Michael J. Spencer
d0d6c9b01e System: Add SwapByteOrder and update Support/MathExtras.h to use it.
llvm-svn: 116234
2010-10-11 21:22:22 +00:00
Dan Gohman
6eb9263898 Relax this check to silently swallow FE_INEXACT, following directions
from rdar://8452472. This unbreaks gcc.dg/builtins-17.c.

llvm-svn: 114368
2010-09-20 22:32:25 +00:00
Dan Gohman
8058e1b851 Attempt to support platforms which don't have fenv.h.
llvm-svn: 114196
2010-09-17 20:06:27 +00:00
Michael J. Spencer
915ffb8284 System/Path: Add isObjectFile().
llvm-svn: 114032
2010-09-15 22:45:45 +00:00
Dan Gohman
81f9434e99 Remove obsolete comments about throwing exceptions.
llvm-svn: 112874
2010-09-02 22:14:51 +00:00
Dan Gohman
5cf037ea20 Add a comment.
llvm-svn: 112836
2010-09-02 17:35:10 +00:00
Dan Gohman
5f2118dd6f Add an interface for unregistering a file from the FilesToRemove list.
llvm-svn: 112705
2010-09-01 14:17:34 +00:00
Michael J. Spencer
b475feaea4 Fix spelling/typo.
llvm-svn: 112585
2010-08-31 06:36:22 +00:00
Owen Anderson
8769f9a8dd Add an erase() method to llvm::ThreadLocal.
llvm-svn: 109686
2010-07-28 22:49:43 +00:00
Owen Anderson
a2322de83e Add more doxygen comments for llvm::ThreadLocal.
llvm-svn: 109683
2010-07-28 22:30:53 +00:00
Chris Lattner
58dad00aa5 Path::isRootDirectory is unimplemented on Unix and not used,
remove it, fixing PR6909.

llvm-svn: 108125
2010-07-12 04:39:07 +00:00
Oscar Fuentes
4c30188483 DataTypes.h.cmake (MSVC): Protect some #define's and use specific
suffixes for integer types.

llvm-svn: 106797
2010-06-24 22:05:52 +00:00
Daniel Dunbar
1457d51ff8 Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
stuff.

llvm-svn: 103333
2010-05-08 02:10:34 +00:00
Nick Lewycky
2b713db8ed Fix typo.
llvm-svn: 102599
2010-04-29 05:54:29 +00:00
Torok Edwin
801742470e Fix use-of-uninitialized value when RWX memory can't be allocated (PR6701).
SELinux doesn't allow 'execmem', returning MAP_FAILED and 'Permission denied'
for mmap or RWX memory. In this case AllocateRWX was returning a MemoryBlock
with uninitialized fields, which sometimes caused crashes.

This patch initializes MemoryBlock fields to 0, so that the RWX-failure check
works.
It doesn't fix the SELinux 'execmem' issues though (the JIT will not work when
SELinux is in enforcing mode).

llvm-svn: 99762
2010-03-28 11:07:36 +00:00
Jeffrey Yasskin
f468a14fb1 Tell Valgrind when we modify already-executed machine code so it knows
to re-instrument the code.  We depend on the system valgrind.h to
avoid adding a new license.

llvm-svn: 98529
2010-03-15 04:57:55 +00:00
Dan Gohman
835086ef52 Fix various doxygen warnings.
llvm-svn: 96779
2010-02-22 04:10:52 +00:00
Dan Gohman
92b6122204 Fix "the the" and similar typos.
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Douglas Gregor
1fcfb8e183 Add llvm::Program::ChangeStderrToBinary().
llvm-svn: 94743
2010-01-28 06:42:08 +00:00
Xerxes Ranby
c3fa089148 Stubs for getHostCPUFeatures API. This implements part of PR5389.
llvm-svn: 93913
2010-01-19 21:26:05 +00:00
Jeffrey Yasskin
d43aca2c4d Make Path use StringRef instead of std::string where possible.
llvm-svn: 91620
2009-12-17 21:02:39 +00:00
Oscar Fuentes
bb3243a706 Removed VC++ compatibility code from DataTypes.h.in.
This header file is not used on VC++ builds.

llvm-svn: 90829
2009-12-08 02:49:54 +00:00
Oscar Fuentes
7c94e1aa2a For VC++, define the ?INT*_C macros only it they are not yet defined.
Some compatibility updates like the Boost TR1 compatibility headers
define them.

Patch contributed by OvermindDL1!

llvm-svn: 90828
2009-12-08 02:40:09 +00:00
Oscar Fuentes
d4427a6b63 Fixes the Atomic implementation if compiled by MSVC compiler.
sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).

Patch by Michael Beck!

llvm-svn: 90748
2009-12-07 05:29:59 +00:00
Edward O'Callaghan
d2ec1dc6a1 Adjust comments to new semantics.
llvm-svn: 89862
2009-11-25 12:00:34 +00:00
Edward O'Callaghan
43864a3136 API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
llvm-svn: 89848
2009-11-25 06:32:19 +00:00
Edward O'Callaghan
fbaf414cc7 Fix comments as pre-post review for rev.89765.
llvm-svn: 89770
2009-11-24 16:29:23 +00:00
Edward O'Callaghan
69ba53657a Provide Path::isSpecialFile interface for PR5568.
llvm-svn: 89765
2009-11-24 15:19:10 +00:00
Daniel Dunbar
59040c2825 Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
- This is an initial step towards -march=native support in Clang, and towards
   eliminating host dependencies in the targets. See PR5389.

 - Patch by Roman Divacky!

llvm-svn: 88768
2009-11-14 10:09:12 +00:00
Mikhail Glushenkov
e6571883fe 80-col violation.
llvm-svn: 86346
2009-11-07 06:33:01 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Nick Lewycky
9d708ff741 Fix typo.
llvm-svn: 83780
2009-10-11 18:53:09 +00:00
Nick Lewycky
a958e6eedf Fix typo.
llvm-svn: 83779
2009-10-11 18:47:33 +00:00
Daniel Dunbar
badca39b69 Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
ExecuteAndWait.

llvm-svn: 82522
2009-09-22 04:44:56 +00:00
Mikhail Glushenkov
3b1f94a1fc Get rid of GetProcessId in Win32/Program.inc.
GetProcessId was introduced only in XP. As a bonus, this change makes Program
objects copyable, since Program is now basically a PID.

llvm-svn: 81826
2009-09-15 03:39:45 +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
Mikhail Glushenkov
e72fc991da Copy-pasto.
llvm-svn: 81331
2009-09-09 10:14:55 +00:00
Mikhail Glushenkov
467895d1f7 Revert 81248 for now.
Program objects have ownership semantics on Windows.

llvm-svn: 81329
2009-09-09 09:52:04 +00:00
Mikhail Glushenkov
eaf0f7f20b Const-correctness.
llvm-svn: 81249
2009-09-08 19:51:39 +00:00