aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Windows
Commit message (Collapse)AuthorAgeFilesLines
* Allow unique_file to take a mode for file permissions, but defaultEric Christopher2012-05-111-2/+4
| | | | | | | | to user only read/write. Part of rdar://11325849 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156591 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/PathV2.inc: Retry rename() for (maximum) 2 seconds.NAKAMURA Takumi2012-05-081-4/+14
| | | | | | Files might be opend by system scanners (eg. file indexer, virus scanner, &c). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156380 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 'Add reverseColor to raw_ostream'.Benjamin Kramer2012-04-161-0/+32
| | | | | | | To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell, with a minor fix for mingw by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154805 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r154800 which breaks windows builders.Argyrios Kyrtzidis2012-04-161-33/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154802 91177308-0d34-0410-b5e6-96231b3b80d8
* Add reverseColor to raw_ostream.Argyrios Kyrtzidis2012-04-161-0/+33
| | | | | | | To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800 91177308-0d34-0410-b5e6-96231b3b80d8
* Change default error_code ctor to a 'named ctor' so it's more self-documenting.David Blaikie2012-02-091-21/+21
| | | | | | | | | | | 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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150197 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SetWorkingDirectory from the Process interface. Nothing in LLVMChandler Carruth2012-01-151-4/+0
| | | | | | | | | | | | 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...) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148211 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the crash reporter when running lit tests.Argyrios Kyrtzidis2012-01-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147965 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r147542 after comments from Joerg SonnenbergerSebastian Pop2012-01-051-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147608 91177308-0d34-0410-b5e6-96231b3b80d8
* use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJITSebastian Pop2012-01-041-0/+4
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147542 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Program: Make Change<stream>ToBinary return error_code.Michael J. Spencer2011-12-131-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146522 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r146363 to allow buildbots to make forward progress.Chad Rosier2011-12-122-58/+0
| | | | | | | | Original commit message: Support/FileSystem: Implement canonicalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146378 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement bool equivalent(file_status A, file_status B);Michael J. Spencer2011-12-121-62/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146364 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement canonicalize.Michael J. Spencer2011-12-122-0/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146363 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Cleanup scoped handles.Michael J. Spencer2011-12-123-58/+77
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146362 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement recursive_directory_iterator and makeMichael J. Spencer2011-12-081-6/+7
| | | | | | directory_iterator preserve InputIterator semantics on copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146200 91177308-0d34-0410-b5e6-96231b3b80d8
* [Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from ↵NAKAMURA Takumi2011-11-292-2/+12
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145389 91177308-0d34-0410-b5e6-96231b3b80d8
* Return only the least significant 8 bits of the exit status fromPeter Collingbourne2011-11-061-1/+1
| | | | | | Process::Wait on Windows (mimicing POSIX behaviour). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143876 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143502 91177308-0d34-0410-b5e6-96231b3b80d8
* rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLESebastian Pop2011-11-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143501 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a couple unused methods. PR11201.Eli Friedman2011-11-011-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143452 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Path.inc: [PR8460] Get rid of ScopedNullTerminator. Thanks to Zvi ↵NAKAMURA Takumi2011-10-241-18/+9
| | | | | | Rackover! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142785 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build on mingw-w64.Anton Korobeynikov2011-10-211-6/+8
| | | | | | | Patch by Ruben Van Boxem! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142646 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of ↵NAKAMURA Takumi2011-10-151-36/+4
| | | | | | | | | | 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-". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142055 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the tripleChad Rosier2011-10-151-4/+36
| | | | | | | | | from config.h, it discovers the triple based on the execution environment. Patch by Aaron Ballman <aaron@aaronballman.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142046 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Memory.inc: Support the ability to allocate memory "near" another ↵NAKAMURA Takumi2011-10-151-2/+7
| | | | | | | | block of memory on Win32. It has fixed FIXME. Thanks to Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142039 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Add support modifying memory permissions on Windows. Patch ↵Michael J. Spencer2011-10-131-3/+45
| | | | | | by Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141910 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!Michael J. Spencer2011-10-131-11/+87
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141907 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Windows x64 stack walking support. Patch by Aaron Ballman!Michael J. Spencer2011-10-011-32/+190
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140906 91177308-0d34-0410-b5e6-96231b3b80d8
* sys::Process: Add a SetWorkingDirectory method.Daniel Dunbar2011-09-231-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140433 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be ↵NAKAMURA Takumi2011-08-231-1/+1
| | | | | | enough for Windows XP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138319 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DynamicLibrary thread-safe w/r/t call to dlerror() after dlopen(). PR10718Jordy Rose2011-08-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138260 91177308-0d34-0410-b5e6-96231b3b80d8
* PathV2: Handle more reserved filenames on windows.Benjamin Kramer2011-08-201-2/+24
| | | | | | | Patch by Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138213 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Support/Windows/Windows.h: Require at least Windows XP(5.1) API. We will ↵NAKAMURA Takumi2011-08-201-2/+2
| | | | | | not support Windows 2000 any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138198 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbork Windows build. Thanks, Francois.Jordy Rose2011-08-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137798 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DynamicLibrary instances as a way to get symbols from a specific ↵Jordy Rose2011-08-171-26/+52
| | | | | | library. Preparation for upcoming (preliminary) support for plugins for the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137791 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.Argyrios Kyrtzidis2011-07-281-11/+14
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!NAKAMURA Takumi2011-07-092-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134812 91177308-0d34-0410-b5e6-96231b3b80d8
* Have Program::Wait return -2 for crashed and timeouts instead of embeddingAndrew Trick2011-05-211-4/+5
| | | | | | | info in the error message. Per Dan's request. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo and missing checkin from r131186.Andrew Trick2011-05-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131187 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl ↵NAKAMURA Takumi2011-05-011-31/+2
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130657 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.NAKAMURA Takumi2011-03-161-1/+8
| | | | | | FIXME: It is a temporal hack. We should detect as many "special file name" as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127724 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed ↵NAKAMURA Takumi2011-03-161-1/+11
| | | | | | | | for workaround. FIXME: We should use sys::fs::unique_file() in future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127723 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the windows build.Rafael Espindola2011-03-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127416 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.NAKAMURA Takumi2011-03-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127140 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Windows.h: Redefine _WIN32_WINNT here. mingw-w64 tends to define it ↵NAKAMURA Takumi2011-02-091-0/+3
| | | | | | as 0x0502 in its headers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125171 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Program.inc: Eliminate the declaration of SetInformationJobObject(). ↵NAKAMURA Takumi2011-02-091-9/+0
| | | | | | It should be provided with _WIN32_WINNT>=0x0500. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125170 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/DynamicLibrary.inc: ELM_Callback fix for mingw-w64.NAKAMURA Takumi2011-02-091-1/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125169 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.NAKAMURA Takumi2011-02-052-60/+83
| | | | | | | config.h.* have conditions whether each symbol is defined or not. Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124950 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Program.inc: Quote arguments when dubious characters (used by ↵NAKAMURA Takumi2011-02-051-1/+1
| | | | | | cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124945 91177308-0d34-0410-b5e6-96231b3b80d8