Andrew Kaylor
960981f691
This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.
...
llvm-svn: 164249
2012-09-19 20:46:12 +00:00
Michael J. Spencer
b1010e4913
Properly test the LLVM_USE_RVALUE_REFERENCES macro.
...
llvm-svn: 161978
2012-08-15 19:16:27 +00:00
Michael J. Spencer
c500bff4cd
[PathV2] Add mapped_file_region. Implementation for Windows and POSIX.
...
llvm-svn: 161976
2012-08-15 19:05:47 +00:00
Benjamin Kramer
febc556c2e
Try to unbreak the windows build.
...
llvm-svn: 160567
2012-07-20 19:49:33 +00:00
Daniel Dunbar
f398977a19
Process: Add sys::Process::FileDescriptorHasColors().
...
llvm-svn: 160557
2012-07-20 18:29:38 +00:00
Bill Wendling
b1bd365dfc
Remove tabs.
...
llvm-svn: 160476
2012-07-19 00:06:06 +00:00
Francois Pichet
0391a62964
Unbreak the MSVC build: add return to unimplemented functions.
...
llvm-svn: 158788
2012-06-20 04:08:49 +00:00
Nick Kledzik
d4f7f6f97a
Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs and add unit test. Unix is implemented. Windows side needs to be implemented.
...
llvm-svn: 158770
2012-06-20 00:28:54 +00:00
Argyrios Kyrtzidis
30b183277e
Satisfy C++ aliasing rules, per suggestion by Chandler.
...
llvm-svn: 158346
2012-06-12 01:06:16 +00:00
Argyrios Kyrtzidis
c10e1df8d8
For llvm::sys::ThreadLocalImpl instead of malloc'ing the platform-specific
...
thread local data, embed them in the class using a uint64_t and make sure
we get compiler errors if there's a platform where this is not big enough.
This makes ThreadLocal more safe for using it in conjunction with CrashRecoveryContext.
Related to crash in rdar://11434201.
llvm-svn: 158342
2012-06-12 00:21:31 +00:00
Aaron Ballman
4f2525a0ee
Disabling a spurious deprecation warning about using PathV1 from within the PathV1 implementation file.
...
llvm-svn: 158274
2012-06-09 13:59:29 +00:00
Aaron Ballman
c8f84c4f1a
Fixing a typo in the comments.
...
llvm-svn: 158273
2012-06-09 13:46:36 +00:00
NAKAMURA Takumi
ec2a9415cc
Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check when someone would remove the tempdir.
...
llvm-svn: 157529
2012-05-27 13:02:04 +00:00
Eric Christopher
c2a56d46fc
Allow unique_file to take a mode for file permissions, but default
...
to user only read/write.
Part of rdar://11325849
llvm-svn: 156591
2012-05-11 00:07:44 +00:00
NAKAMURA Takumi
334c0709db
Windows/PathV2.inc: Retry rename() for (maximum) 2 seconds.
...
Files might be opend by system scanners (eg. file indexer, virus scanner, &c).
llvm-svn: 156380
2012-05-08 14:31:46 +00:00
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