1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

736 Commits

Author SHA1 Message Date
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
Dan Gohman
36d08298f4 Delete unused variables.
llvm-svn: 118128
2010-11-03 00:09:12 +00:00
Dan Gohman
4ad5745d44 Remove several unhelpful checks for isValid from sys::Path.
llvm-svn: 118127
2010-11-03 00:01:23 +00:00
Dan Gohman
3a69090d70 Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can check
limits on their own.

llvm-svn: 118113
2010-11-02 23:19:55 +00:00
Dan Gohman
ea2d1eb5d4 Simplify.
llvm-svn: 118110
2010-11-02 23:16:26 +00:00
Dan Gohman
1250781030 Fix a copy+pasto.
llvm-svn: 118106
2010-11-02 22:56:51 +00:00
Dan Gohman
1c41b20c57 Avoid manipulating paths in fixed-sized arrays.
llvm-svn: 118105
2010-11-02 22:55:34 +00:00
Dan Gohman
ce8c453106 Simplify this code.
llvm-svn: 118102
2010-11-02 22:50:10 +00:00
Dan Gohman
78b47498e3 Use '\0' instead of 0 for nul character constants.
llvm-svn: 118096
2010-11-02 22:41:19 +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
Dan Gohman
446b7f5e51 Eliminate some temporary std::strings.
llvm-svn: 118086
2010-11-02 22:07:47 +00:00
Dan Gohman
84ceaa19a4 Micro-optimize.
llvm-svn: 118058
2010-11-02 20:52:47 +00:00
Mikhail Glushenkov
4c2caa10ad GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.
This allows using GetDLLSuffix() with appendSuffix().

llvm-svn: 118051
2010-11-02 20:32:59 +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
efb9f9754d 80-col violations.
llvm-svn: 118045
2010-11-02 20:32:31 +00:00
Mikhail Glushenkov
c86f1d26e9 Path: Add GetEXESuffix() to complement GetDLLSuffix().
llvm-svn: 118042
2010-11-02 20:32:26 +00:00
Dan Gohman
85403d8246 Check if ErrMsg is null. This fixes the "not" command.
llvm-svn: 117666
2010-10-29 17:20:42 +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
Dan Gohman
a80b1afde3 Make Program::Wait provide an error message string for errors
executing the child process and abnormal child process termination.

llvm-svn: 117661
2010-10-29 16:39:01 +00:00
Dan Gohman
d512ed689c Revert r117582, which reverted r77396. Searching PATH for a string
which contains slashes is inconsistent with the meaning of PATH on
Unix-type platforms, and pretty surprising.

If the user has given a specific path to execute and we can't
execute it, we should fail and say why.  (Apparently the new
posix_spawn code doesn't always say why, but that's a separate
issue.)

llvm-svn: 117596
2010-10-28 20:34:33 +00:00
Mikhail Glushenkov
b727c53cff Revert r77396.
Original commit message:

    On "Unix", if Program::FindProgramByName is given a name containing
    slashes, just go with it, regardless of whether it looks like it will
    be executable. This follows the behavior of sh(1) more closely.

It's better when behaviour is consistent between platforms. This change also
makes FindExecutable() behave as expected on unix-likes (before this commit, it
used to always succeed).

llvm-svn: 117582
2010-10-28 19:32:58 +00:00
Mikhail Glushenkov
e2c628c84f Trailing whitespace.
llvm-svn: 117581
2010-10-28 19:32:53 +00:00
Mikhail Glushenkov
4bf08b3a06 Reindent.
llvm-svn: 117538
2010-10-28 08:25:44 +00:00
Mikhail Glushenkov
df4eb2e516 80-col violation.
llvm-svn: 117443
2010-10-27 09:09:10 +00:00
Mikhail Glushenkov
5eeaebe9b8 Remove try/catch(...) from Win32/Signals.inc.
catch(...) is used in Win32/Signals.inc for catching Win32 structured
exceptions, but according to [1], this is wrong.

We can't simply change try/catch to __try/__finally, since this syntax is not
supported by MinGW. We can use __try/__finally on MSVC and __try1/__except1
macros on MinGW [2], but I think that that solution obfuscates the code too
much.

The use of try/catch(...) in Signals.inc makes it impossible to link
MinGW-compiled libSystem with llvm-gcc compiled executables. I propose that we
just remove try/catch(...) from Signals.inc, since the meaning of the code won't
change.

[1] http://members.cox.net/doug_web/eh.htm
[2] http://article.gmane.org/gmane.comp.compilers.llvm.cvs/81315

llvm-svn: 117442
2010-10-27 09:09:04 +00:00
Duncan Sands
8119017726 ATTRIBUTE_UNUSED has been renamed to LLVM_ATTRIBUTE_UNUSED.
Rather than rename this instance, use the cast-to-void idiom
instead.  This will hopefully fix the windows buildbots.

llvm-svn: 117262
2010-10-25 13:10:03 +00:00
NAKAMURA Takumi
76a048b6e7 Win32/Signals.inc: DontRemoveFileOnSignal(): Please acquire the CriticalSection.
It choked BugPoint on Mingw.

llvm-svn: 117083
2010-10-22 01:23:50 +00:00
Mikhail Glushenkov
55ada6816e Trailing whitespace.
llvm-svn: 117058
2010-10-21 20:40:39 +00:00
Michael J. Spencer
fd40803107 Use C++03...
llvm-svn: 116927
2010-10-20 16:00:45 +00:00
Michael J. Spencer
2da558d210 System-Win32/Path: Fix incorrect assumption in isValid.
A recent commit to clang exposed a bug in the Win32 Path code. This is a
minimal fix for it.

llvm-svn: 116925
2010-10-20 15:23:58 +00:00
Chandler Carruth
55850cad48 Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete three
#includes in the process.

llvm-svn: 116919
2010-10-20 08:27:02 +00:00
NAKAMURA Takumi
0f54a81d63 Add ATTRIBUTE_UNUSED for -Asserts.
llvm-svn: 116909
2010-10-20 04:05:29 +00:00
NAKAMURA Takumi
1c62027520 lib/System/Win32/ThreadLocal.inc: Suppress "unused" warning on -Asserts.
llvm-svn: 116785
2010-10-19 01:22:01 +00:00
Oscar Fuentes
a6ffccab95 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
Oscar Fuentes
0d564b6bb5 When building shared libraries, link to required system libraries.
PR 8375

llvm-svn: 116479
2010-10-14 15:54:41 +00:00
Daniel Dunbar
2b6bcb4978 Change explicit search Apple specific code to only reference __eprintf on x86.
llvm-svn: 116239
2010-10-11 21:34:24 +00:00
Daniel Dunbar
0ee860f6fd CrashRecovery: Fix raise() override to actually send the right signal, *cough*.
llvm-svn: 116072
2010-10-08 18:31:34 +00:00
Evan Cheng
6ff4de5199 Correctly check if a path is a directory. Fix by Brian Korver.
llvm-svn: 115991
2010-10-07 22:05:57 +00:00
NAKAMURA Takumi
d4612e13ab lib/System/Win32/Signals.inc: Enable LLVM_DISABLE_CRT_DEBUG also on mingw.
llvm-svn: 115731
2010-10-06 02:15:22 +00:00
Daniel Dunbar
c21ab2a74c Add an explicit initialization to work around what appears to be a valgrind
false positive, at least on Darwin. I haven't filed this, but you can feel free.

llvm-svn: 115242
2010-09-30 23:56:49 +00:00
Francois Pichet
0c653599a9 Revert r114320(move file = copy + delete on Win32). r115040 is a better solution for the Win32 ACCESS_DENIED lit error.
llvm-svn: 115114
2010-09-30 00:44:58 +00:00
Daniel Dunbar
ea457b3edb CrashRecovery/Darwin: Override raise() as well so that crash recovery doesn't
end up altering the thread on which crashes are done because of its use of
Darwin's broken raise() implementation.

llvm-svn: 114558
2010-09-22 17:46:10 +00:00
Francois Pichet
53617de15e Fix the "unable to rename temporary" lit test failing on Windows. rename is now copy + delete on Windows. Problem to be revisited for a permanent and clean solution.
llvm-svn: 114320
2010-09-20 04:03:07 +00:00
Jakob Stoklund Olesen
8ae6803659 Add one more Core i7 model number.
llvm-svn: 114310
2010-09-19 17:54:28 +00:00
Chris Lattner
4e80799dbb add corei7, the laptop version.
llvm-svn: 114302
2010-09-19 00:31:58 +00:00
NAKAMURA Takumi
14029b5d65 Move the declaration SetInformationJobObject() outside of namespace.
It is also workaround for PR7927.

llvm-svn: 114175
2010-09-17 11:14:18 +00:00
Daniel Dunbar
8a328e38c5 System: Don't reexport ___eprintf when building with Clang; this symbol isn't
used on Darwin anymore, and Clang might not always link with the library it is
currently found in.

llvm-svn: 114165
2010-09-17 04:25:24 +00:00
Michael J. Spencer
4b7f13a515 System/Path: Add x86-64 COFF to IdentifyFileType.
llvm-svn: 114037
2010-09-15 23:04:14 +00:00
Michael J. Spencer
915ffb8284 System/Path: Add isObjectFile().
llvm-svn: 114032
2010-09-15 22:45:45 +00:00
NAKAMURA Takumi
aa9b257b29 lib/System/Host.cpp: 7bit-ize. Eliminate "TM" and "(R)" in comments.
llvm-svn: 113486
2010-09-09 13:30:48 +00:00