summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-123-1/+3
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Trying to fix the windows build.Rafael Espindola2014-06-121-4/+3
| | | | llvm-svn: 210805
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210783
* Don't import make_error_code into the llvm namespace.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210772
* Prefix generic_category with std::.Rafael Espindola2014-06-121-2/+2
| | | | | | Sorry I missed these before. llvm-svn: 210740
* Don't put generic_category in the llvm namespace.Rafael Espindola2014-06-121-2/+2
| | | | llvm-svn: 210737
* Used mapWindowsError. I missed these in the initial transition.Rafael Espindola2014-06-121-3/+4
| | | | llvm-svn: 210729
* Implement get_magic with generic tools and inline it.Rafael Espindola2014-06-111-42/+0
| | | | llvm-svn: 210716
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-113-150/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of this patch is to turn llvm/Support/system_error.h into a transitional header that just brings in the erorr_code api to the llvm namespace. I will remove it shortly afterwards. The cases where the general idea needed some tweaking: * std::errc is a namespace in msvc, so we cannot use "using std::errc". I could add an #ifdef, but there were not that many uses, so I just added std:: to them in this patch. * Template specialization had to be moved to the std namespace in this patch set already. * The msvc implementation of default_error_condition doesn't seem to provide the same transformations as we need. Not too surprising since the standard doesn't actually say what "equivalent" means. I fixed the problem by keeping our old mapping and using it at error_code construction time. Despite these shortcomings I think this is still a good thing. Some reasons: * The different implementations of system_error might improve over time. * It removes 925 lines of code from llvm already. * It removes 6313 bytes from the text segment of the clang binary when it is built with gcc and 2816 bytes when building with clang and libstdc++. llvm-svn: 210687
* Remove windows_error.Rafael Espindola2014-06-112-30/+40
| | | | | | | | | | MSVC doesn't seem to provide any is_error_code_enum enumeration for the windows errors. Fortunately very few places in llvm have to handle raw windows errors, so we can just construct the corresponding error_code directly. llvm-svn: 210631
* Process::GetRandomNumber(): fix insecure RNGAlp Toker2014-06-031-2/+3
| | | | | | | This could have generated non-random output under error conditions in release builds. llvm-svn: 210065
* Fix windows build.Rafael Espindola2014-05-312-3/+2
| | | | llvm-svn: 209961
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-311-2/+2
| | | | llvm-svn: 209957
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-313-33/+33
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209952
* delete dead code.Rafael Espindola2014-05-311-11/+0
| | | | llvm-svn: 209938
* Clean up language and grammar.Eric Christopher2014-05-201-1/+1
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209216
* MemoryBuffer: Use GetNativeSystemInfo()Alp Toker2014-05-191-8/+6
| | | | | | | Removes old 4096 byte workaround. This functionality has been available since Windows XP. llvm-svn: 209137
* Use raw_ostream and Format.h on Windows so that we don't have to rollChandler Carruth2014-04-281-5/+10
| | | | | | our own portability system to cope without snprintf. llvm-svn: 207389
* Update the Windows TimeValue formatting to match the new formatting onChandler Carruth2014-04-281-9/+5
| | | | | | Unix-like OSes. llvm-svn: 207388
* Windows: canonicalise the default windows tripleSaleem Abdulrasool2014-03-291-1/+1
| | | | | | | Canonicalise the default triple that is used on Windows. This should hopefully fix the MSVC buildbots. llvm-svn: 205070
* support: add a utility function to normalise path separatorsSaleem Abdulrasool2014-03-111-0/+5
| | | | | | | | Add a utility function to convert the Windows path separator to Unix style path separators. This is used by a subsequent change in clang to enable the use of Windows SDK headers on Linux. llvm-svn: 203611
* Cleanup the interface for creating soft or hard links.Rafael Espindola2014-03-111-1/+2
| | | | | | | | | | | | Before this patch the unix code for creating hardlinks was unused. The code for creating symbolic links was implemented in lib/Support/LockFileManager.cpp and the code for creating hard links in lib/Support/*/Path.inc. The only use we have for these is in LockFileManager.cpp and it can use both soft and hard links. Just have a create_link function that creates one or the other depending on the platform. llvm-svn: 203596
* Revert create_symbolic_link and both depending changesReid Kleckner2014-03-061-19/+0
| | | | | | | | | | This reverts commits r203136, r203137, and r203138. This code doesn't build on Windows. Even on Vista+, Windows requires elevated privileges to create a symlink. Therefore we can't use symlinks in the compiler. We'll have to find another approach. llvm-svn: 203143
* [Support/FileSystem] Introduce llvm::sys::fs::create_symbolic_link().Argyrios Kyrtzidis2014-03-061-0/+19
| | | | llvm-svn: 203136
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-2/+1
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Remove unnecessary variables.Ahmed Charles2014-03-051-2/+2
| | | | | | Found self-hosting clang-cl on windows. :) llvm-svn: 202935
* [C++11] Remove the R-value reference #if usage from the ADT and SupportChandler Carruth2014-03-011-2/+0
| | | | | | libraries. It is now always 1 in LLVM builds. llvm-svn: 202580
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-1/+1
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* Share a createUniqueEntity implementation between unix and windows.Rafael Espindola2014-02-241-130/+13
| | | | | | | The only extra bit of functionality that had to be exposed for this be be implemented in Path.cpp is opening a file in rw mode. llvm-svn: 202005
* Delete dead code.Rafael Espindola2014-02-241-7/+0
| | | | llvm-svn: 202001
* Use static instead of an anonymous namespace.Rafael Espindola2014-02-231-21/+19
| | | | llvm-svn: 201983
* Simplify remove, create_directory and create_directories.Rafael Espindola2014-02-231-32/+20
| | | | | | | | | | | | | | | Before this patch they would take an boolean argument to say if the path already existed. This was redundant with the returned error_code which is able to represent that. This allowed for callers to incorrectly check only the existed flag instead of first checking the error code. Instead, pass in a boolean flag to say if the previous (non-)existence should be an error or not. Callers of the of the old simple versions are not affected. They still ignore the previous (non-)existence as they did before. llvm-svn: 201979
* Use simpler form of llvm::sys::fs::remove.Rafael Espindola2014-02-231-2/+1
| | | | llvm-svn: 201975
* [Support] Correctly handle zero length inputs to UTF conversion functions on ↵Michael J. Spencer2014-02-201-32/+30
| | | | | | Windows. llvm-svn: 201811
* Remove dead code.Rafael Espindola2014-02-131-32/+0
| | | | llvm-svn: 201327
* Rename Windows.h to WindowsSupport.h to avoid ambiguityReid Kleckner2014-02-1212-13/+16
| | | | llvm-svn: 201258
* Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.NAKAMURA Takumi2014-02-121-2/+3
| | | | | | | | | | | | | | | I found that swapping the order of some header files helped fix a build issue that we're seeing on mingw32. Without the swap, windows.h was being included before _WIN32_WINNT was being defined and the CreateHardLinkW function was #ifdef'd out. It looks like the header is mainly used to get the SHGetFolderPathW function, so I don't think that there'll be much fallout from the switch. Suggested by Alex Crichton. Thanks! llvm-svn: 201230
* Using the helper API for random number generation.Aaron Ballman2014-02-111-13/+1
| | | | llvm-svn: 201125
* Hopefully fixing the MinGW 32 build, which was broken by r200767. Not using ↵Aaron Ballman2014-02-111-4/+11
| | | | | | rand_s() since MinGW does not have an implementation for it, but instead using the underlying CryptGenRandom APIs. llvm-svn: 201124
* Try to unbreak the mingw32 build.Benjamin Kramer2014-02-071-1/+1
| | | | llvm-svn: 200973
* Implemented support for Process::GetRandomNumber on Windows.Aaron Ballman2014-02-041-0/+7
| | | | | | Patch thanks to Stephan Tolksdorf! llvm-svn: 200767
* Undef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.Aaron Ballman2014-02-031-0/+1
| | | | | | No functional change intended. llvm-svn: 200704
* Hopefully fix mingw32 bots.Peter Collingbourne2014-02-011-1/+1
| | | | | | For some reason this symbolic constant isn't defined in some versions of mingw32. llvm-svn: 200605
* Introduce llvm::sys::path::home_directory.Peter Collingbourne2014-01-311-0/+17
| | | | | | | | | This will be used by the line editor library to derive a default path to the history file. Differential Revision: http://llvm-reviews.chandlerc.com/D2199 llvm-svn: 200594
* Try to fix the windows build. The comments in other files don't seem toChandler Carruth2014-01-072-7/+8
| | | | | | be quite accurate. =] llvm-svn: 198690
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-073-5/+9
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Correct word hyphenationsAlp Toker2013-12-051-1/+1
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
* Checking for a return value with FormatMessage; if the call fails, there's ↵Aaron Ballman2013-11-181-4/+9
| | | | | | no guarantee that the buffer will be non-null. llvm-svn: 195019
* Fix a conversion warning in the mingw32 buildAlp Toker2013-10-181-2/+2
| | | | | | | | | | | gcc diagnoses this: warning: converting to non-pointer type 'unsigned int' from NULL Also remove an empty statement. No change in functionality. llvm-svn: 192955
OpenPOWER on IntegriCloud