summaryrefslogtreecommitdiff
path: root/lib/System/Win32
Commit message (Collapse)AuthorAge
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the first step in adding sane error handling support to LLVMSystem.Michael J. Spencer2010-11-16
| | | | | | | | | | | | | | | | | The system API's will be shifted over to returning an error_code, and returning other return values as out parameters to the function. Code that needs to check error conditions will use the errc enum values which are the same as the posix_errno defines (EBADF, E2BIG, etc...), and are compatable with the error codes in WinError.h due to some magic in system_error. An example would be: if (error_code ec = KillEvil("Java")) { // error_code can be converted to bool. handle_error(ec); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119360 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Whitespace.Michael J. Spencer2010-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118683 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Win32/Path: Implement isSymLink.Michael J. Spencer2010-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118681 91177308-0d34-0410-b5e6-96231b3b80d8
* Win32/Process.inc: [PR8527] Process::FileDescriptorIsDisplayed(fd) should ↵NAKAMURA Takumi2010-11-10
| | | | | | | | not check by FILE_TYPE_CHAR. It must be better to check it with Console API. The special file "NUL" is FILE_TYPE_CHAR with GetFileType(h). It was treated as display device and discarding output to NUL had failed. (eg. opt -o nul) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118678 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path/Windows: Implement GetLLVMDefaultConfigDir.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118507 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path/Windows: Generalize GetUserHomeDirectory.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118506 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path/Windows: Make GetSystemLibraryPaths more generic.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118505 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Windows: Reduce dependencies.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118504 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Windows: Use normalized case and include method.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118503 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118502 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment.Michael J. Spencer2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118501 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove contributor names as per coding statndard.Michael J. Spencer2010-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118442 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method for checking if a path is a symbolic link.Rafael Espindola2010-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118367 91177308-0d34-0410-b5e6-96231b3b80d8
* appendSuffix: don't append a dot when the suffix is empty.Mikhail Glushenkov2010-11-02
| | | | | | | Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118089 91177308-0d34-0410-b5e6-96231b3b80d8
* Make FindProgramByName return paths with slashes unmodified on Windows.Mikhail Glushenkov2010-11-02
| | | | | | This makes its behaviour more consistent across platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118048 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-col violations.Mikhail Glushenkov2010-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118045 91177308-0d34-0410-b5e6-96231b3b80d8
* Path: Add GetEXESuffix() to complement GetDLLSuffix().Mikhail Glushenkov2010-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118042 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Program::Wait differentiate execution failure due to the fileDan Gohman2010-10-29
| | | | | | | being not found from the file being not executable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117664 91177308-0d34-0410-b5e6-96231b3b80d8
* Reindent.Mikhail Glushenkov2010-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117538 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-col violation.Mikhail Glushenkov2010-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117443 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove try/catch(...) from Win32/Signals.inc.Mikhail Glushenkov2010-10-27
| | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117442 91177308-0d34-0410-b5e6-96231b3b80d8
* ATTRIBUTE_UNUSED has been renamed to LLVM_ATTRIBUTE_UNUSED.Duncan Sands2010-10-25
| | | | | | | | Rather than rename this instance, use the cast-to-void idiom instead. This will hopefully fix the windows buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117262 91177308-0d34-0410-b5e6-96231b3b80d8
* Win32/Signals.inc: DontRemoveFileOnSignal(): Please acquire the CriticalSection.NAKAMURA Takumi2010-10-22
| | | | | | It choked BugPoint on Mingw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117083 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117058 91177308-0d34-0410-b5e6-96231b3b80d8
* Use C++03...Michael J. Spencer2010-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116927 91177308-0d34-0410-b5e6-96231b3b80d8
* System-Win32/Path: Fix incorrect assumption in isValid.Michael J. Spencer2010-10-20
| | | | | | | A recent commit to clang exposed a bug in the Win32 Path code. This is a minimal fix for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116925 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ATTRIBUTE_UNUSED for -Asserts.NAKAMURA Takumi2010-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116909 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/System/Win32/ThreadLocal.inc: Suppress "unused" warning on -Asserts.NAKAMURA Takumi2010-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116785 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/System/Win32/Signals.inc: Enable LLVM_DISABLE_CRT_DEBUG also on mingw.NAKAMURA Takumi2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115731 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r114320(move file = copy + delete on Win32). r115040 is a better ↵Francois Pichet2010-09-30
| | | | | | solution for the Win32 ACCESS_DENIED lit error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115114 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the "unable to rename temporary" lit test failing on Windows. rename is ↵Francois Pichet2010-09-20
| | | | | | now copy + delete on Windows. Problem to be revisited for a permanent and clean solution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114320 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the declaration SetInformationJobObject() outside of namespace.NAKAMURA Takumi2010-09-17
| | | | | | It is also workaround for PR7927. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114175 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an interface for unregistering a file from the FilesToRemove list.Dan Gohman2010-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112705 91177308-0d34-0410-b5e6-96231b3b80d8
* System: Fix getMagicNumber on windows.Michael J. Spencer2010-08-31
| | | | | | | | | | getMagicNumber was treating the _binary_ data it read in as a null terminated string. This resulted in the std::string calculating the length, and causing an assert in other code that assumed that the length it passed was the same as the length of the string it would get back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112586 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't cast Win32 FILETIME structs to int64. Patch by Dimitry Andric!Michael J. Spencer2010-08-28
| | | | | | | | | | | | | | | According to the Microsoft documentation here: http://msdn.microsoft.com/en-us/library/ms724284%28VS.85%29.aspx this cast used in lib/System/Win32/Path.inc: __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); should not be done. The documentation says: "Do not cast a pointer to a FILETIME structure to either a ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112376 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an erase() method to llvm::ThreadLocal.Owen Anderson2010-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109686 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some tab stops into spaces.Duncan Sands2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
* Path::isRootDirectory is unimplemented on Unix and not used,Chris Lattner2010-07-12
| | | | | | | remove it, fixing PR6909. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108125 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanupDaniel Dunbar2010-05-08
| | | | | | stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103333 91177308-0d34-0410-b5e6-96231b3b80d8
* AddSignalHandler was not releasing the critical section on win32.Torok Edwin2010-03-31
| | | | | | | Patch from Gianluigi Tiesi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100003 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly quote the quotes :) during cmdline construction on Windows.Anton Korobeynikov2010-03-28
| | | | | | | | | Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro got the bar value, not "bar". Patch by Alexander Esilevich! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99763 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove superfluous NULL assignmentKovarththanan Rajaratnam2010-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98350 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94743 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious semicolon.Anton Korobeynikov2010-01-14
| | | | | | Patch by Diego Iastrubni! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93450 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Win32 Path.inc for API update.Daniel Dunbar2009-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91706 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Path use StringRef instead of std::string where possible.Jeffrey Yasskin2009-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91620 91177308-0d34-0410-b5e6-96231b3b80d8
* API change Path::isSpecialFile to Path::isRegularFile, improve semantics in ↵Edward O'Callaghan2009-11-25
| | | | | | regards to comments from 89765 post review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89848 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide Path::isSpecialFile interface for PR5568.Edward O'Callaghan2009-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89765 91177308-0d34-0410-b5e6-96231b3b80d8
* Path::createDirectoryOnDisk should ignore existing directories on win32 too.Benjamin Kramer2009-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86132 91177308-0d34-0410-b5e6-96231b3b80d8