Benjamin Kramer
a72a6005f8
Reapply 'Add reverseColor to raw_ostream'.
...
To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell, with a minor fix for mingw by me.
llvm-svn: 154805
2012-04-16 08:56:50 +00:00
Argyrios Kyrtzidis
4950ffbb4f
Revert r154800 which breaks windows builders.
...
llvm-svn: 154802
2012-04-16 07:59:39 +00:00
Argyrios Kyrtzidis
3d576f296a
Add reverseColor to raw_ostream.
...
To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!
llvm-svn: 154800
2012-04-16 07:07:38 +00:00
David Blaikie
96c1cf4949
Change default error_code ctor to a 'named ctor' so it's more self-documenting.
...
Unify default construction of error_code uses on this idiom so that users don't
feel compelled to make static globals for naming convenience. (unfortunately I
couldn't make the original ctor private as some APIs don't return their result,
instead using an out parameter (that makes sense to default construct) - which
is a bit of a pity. I did, however, find/fix some cases of unnecessary default
construction of error_code before I hit the unfixable cases)
llvm-svn: 150197
2012-02-09 19:24:12 +00:00
Chandler Carruth
d328cc2c87
Remove SetWorkingDirectory from the Process interface. Nothing in LLVM
...
or Clang is using this, and it would be hard to use it correctly given
the thread hostility of the function. Also, it never checked the return
which is rather dangerous with chdir. If someone was in fact using this,
please let me know, as well as what the usecase actually is so that
I can add it back and make it more correct and secure to use. (That
said, it's never going to be "safe" per-se, but we could at least
document the risks...)
llvm-svn: 148211
2012-01-15 08:41:35 +00:00
Argyrios Kyrtzidis
42ff94f069
Disable the crash reporter when running lit tests.
...
llvm-svn: 147965
2012-01-11 20:53:25 +00:00
Sebastian Pop
53d6e3b9d3
revert r147542 after comments from Joerg Sonnenberger
...
llvm-svn: 147608
2012-01-05 18:28:46 +00:00
Sebastian Pop
4f82b3a13f
use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
...
Get back getHostTriple.
For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.
llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Michael J. Spencer
52d5a254bc
Support/Program: Make Change<stream>ToBinary return error_code.
...
llvm-svn: 146522
2011-12-13 23:16:49 +00:00
Chad Rosier
dc87aebd3c
Revert r146363 to allow buildbots to make forward progress.
...
Original commit message:
Support/FileSystem: Implement canonicalize.
llvm-svn: 146378
2011-12-12 17:58:31 +00:00
Michael J. Spencer
b6d86d4978
Support/FileSystem: Implement bool equivalent(file_status A, file_status B);
...
llvm-svn: 146364
2011-12-12 06:04:28 +00:00
Michael J. Spencer
fd161c5276
Support/FileSystem: Implement canonicalize.
...
llvm-svn: 146363
2011-12-12 06:04:01 +00:00
Michael J. Spencer
88c9342c25
Support/Windows: Cleanup scoped handles.
...
llvm-svn: 146362
2011-12-12 06:03:33 +00:00
Michael J. Spencer
d85f1f84f3
Support/FileSystem: Implement recursive_directory_iterator and make
...
directory_iterator preserve InputIterator semantics on copy.
llvm-svn: 146200
2011-12-08 22:50:09 +00:00
NAKAMURA Takumi
b92661d00a
[Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver.
...
clang/lib/Driver/Driver.cpp: Don't pass through negative exit status, or parent would be confused.
llvm::sys::Program::Wait(): Suppose 0x8000XXXX and 0xC000XXXX as abnormal exit code and pass it as negative value.
Win32 Exception Handler: Exit with ExceptionCode on an unhandle exception.
llvm-svn: 145389
2011-11-29 07:47:04 +00:00
Peter Collingbourne
6ec231f82f
Return only the least significant 8 bits of the exit status from
...
Process::Wait on Windows (mimicing POSIX behaviour).
llvm-svn: 143876
2011-11-06 16:45:46 +00:00
Sebastian Pop
f72a853709
rename getHostTriple into getDefaultTargetTriple
...
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Sebastian Pop
69b2b86143
rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
...
llvm-svn: 143501
2011-11-01 21:31:44 +00:00
Eli Friedman
62794425dd
Remove a couple unused methods. PR11201.
...
llvm-svn: 143452
2011-11-01 05:11:01 +00:00
NAKAMURA Takumi
679aa96408
Windows/Path.inc: [PR8460] Get rid of ScopedNullTerminator. Thanks to Zvi Rackover!
...
llvm-svn: 142785
2011-10-24 03:27:19 +00:00
Anton Korobeynikov
e91e40b137
Fix build on mingw-w64.
...
Patch by Ruben Van Boxem!
llvm-svn: 142646
2011-10-21 09:38:50 +00:00
NAKAMURA Takumi
f7ee2603c2
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple"
...
It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects.
By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-".
llvm-svn: 142055
2011-10-15 04:29:36 +00:00
Chad Rosier
6e6dd4880b
Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
...
from config.h, it discovers the triple based on the execution environment.
Patch by Aaron Ballman <aaron@aaronballman.com>
llvm-svn: 142046
2011-10-15 02:10:06 +00:00
NAKAMURA Takumi
88ad0d5a50
Windows/Memory.inc: Support the ability to allocate memory "near" another block of memory on Win32. It has fixed FIXME.
...
Thanks to Aaron Ballman!
llvm-svn: 142039
2011-10-15 01:58:16 +00:00
Michael J. Spencer
5cbe7170de
Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!
...
llvm-svn: 141910
2011-10-13 23:16:01 +00:00
Michael J. Spencer
1c388c42ea
Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
...
llvm-svn: 141907
2011-10-13 23:10:56 +00:00
Michael J. Spencer
2a1d60faf5
Add Windows x64 stack walking support. Patch by Aaron Ballman!
...
llvm-svn: 140906
2011-10-01 00:05:20 +00:00
Daniel Dunbar
599366dcae
sys::Process: Add a SetWorkingDirectory method.
...
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
NAKAMURA Takumi
6b729bec35
lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for Windows XP.
...
llvm-svn: 138319
2011-08-23 03:49:11 +00:00
Jordy Rose
62453a17f9
Make DynamicLibrary thread-safe w/r/t call to dlerror() after dlopen(). PR10718
...
llvm-svn: 138260
2011-08-22 19:01:52 +00:00
Benjamin Kramer
c767059573
PathV2: Handle more reserved filenames on windows.
...
Patch by Aaron Ballman!
llvm-svn: 138213
2011-08-20 21:36:38 +00:00
NAKAMURA Takumi
c5e4d7690d
lib/Support/Windows/Windows.h: Require at least Windows XP(5.1) API. We will not support Windows 2000 any more.
...
llvm-svn: 138198
2011-08-20 06:35:31 +00:00
Jordy Rose
5bad954019
Unbork Windows build. Thanks, Francois.
...
llvm-svn: 137798
2011-08-17 00:59:50 +00:00
Jordy Rose
c689530acc
Use DynamicLibrary instances as a way to get symbols from a specific library. Preparation for upcoming (preliminary) support for plugins for the static analyzer.
...
llvm-svn: 137791
2011-08-17 00:29:32 +00:00
Argyrios Kyrtzidis
a95f22ea2b
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
...
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.
llvm-svn: 136310
2011-07-28 00:29:20 +00:00
NAKAMURA Takumi
e76bac062b
Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!
...
llvm-svn: 134812
2011-07-09 08:41:20 +00:00
Andrew Trick
9f867fd2dc
Have Program::Wait return -2 for crashed and timeouts instead of embedding
...
info in the error message. Per Dan's request.
llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Andrew Trick
9d2b107117
Typo and missing checkin from r131186.
...
llvm-svn: 131187
2011-05-11 16:44:08 +00:00
NAKAMURA Takumi
3788ada5db
Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
...
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.
llvm-svn: 130657
2011-05-01 13:29:49 +00:00
NAKAMURA Takumi
bcbcf099b4
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
...
FIXME: It is a temporal hack. We should detect as many "special file name" as possible.
llvm-svn: 127724
2011-03-16 02:53:32 +00:00
NAKAMURA Takumi
042801b7d2
Windows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed for workaround.
...
FIXME: We should use sys::fs::unique_file() in future.
llvm-svn: 127723
2011-03-16 02:53:24 +00:00
Rafael Espindola
11ae298b4f
Try to fix the windows build.
...
llvm-svn: 127416
2011-03-10 18:30:48 +00:00
NAKAMURA Takumi
6587cb0973
Windows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.
...
llvm-svn: 127140
2011-03-07 00:12:53 +00:00
NAKAMURA Takumi
26a6cce27e
Windows/Windows.h: Redefine _WIN32_WINNT here. mingw-w64 tends to define it as 0x0502 in its headers.
...
llvm-svn: 125171
2011-02-09 04:18:30 +00:00
NAKAMURA Takumi
6a5d1afdb4
Windows/Program.inc: Eliminate the declaration of SetInformationJobObject(). It should be provided with _WIN32_WINNT>=0x0500.
...
llvm-svn: 125170
2011-02-09 04:18:21 +00:00
NAKAMURA Takumi
8648711e14
Windows/DynamicLibrary.inc: ELM_Callback fix for mingw-w64.
...
llvm-svn: 125169
2011-02-09 04:18:12 +00:00
NAKAMURA Takumi
aa8b506820
Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
...
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.
llvm-svn: 124950
2011-02-05 15:11:53 +00:00
NAKAMURA Takumi
6008a70d4a
Windows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev.
...
llvm-svn: 124945
2011-02-05 08:53:12 +00:00
NAKAMURA Takumi
872c15ce42
Make Win32's header file name lower for cross build on case-sensitive filesystem.
...
llvm-svn: 124864
2011-02-04 12:53:04 +00:00
NAKAMURA Takumi
04e2fe7fd0
Windows/PathV2.inc: For CryptAcquireContext(), CRYPT_VERIFYCONTEXT may be specified for easy use.
...
llvm-svn: 123687
2011-01-17 22:41:34 +00:00