| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 192953
|
|
|
|
| |
llvm-svn: 192564
|
|
|
|
|
|
| |
We don't delay load it so it shouldn't be going anywhere.
llvm-svn: 192561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using an anti-pattern of:
- LoadLibrary
- GetProcAddress
- FreeLibrary
This is problematic because of several reasons:
- We are holding on to pointers into a library we just unloaded.
- Calling LoadLibrary results in an increase in the reference count of
the library in question and any libraries that it depends on and
so-on and so-forth. This is none too quick.
Instead, use GetModuleHandleEx with GET_MODULE_HANDLE_EX_FLAG_PIN. This
is done because because we didn't bring the reference for the library
into existence and therefor shouldn't count on it being around later.
llvm-svn: 192550
|
|
|
|
| |
llvm-svn: 192519
|
|
|
|
|
|
| |
This is ever-so faster but more importantly matches what we have elsewhere.
llvm-svn: 192137
|
|
|
|
|
|
| |
zero.
llvm-svn: 192103
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses several issues in a similar vein:
- Use the Unicode APIs when possible, running nm on clang shows that we
only use Unicode APIs except for FormatMessage, CreateSemaphore, and
GetModuleHandle. AFAICT, the latter two are coming from MinGW and
not LLVM itself.
- Make getMainExecutable more resilient. It previously considered
return values of zero from ::GetModuleFileNameA to be acceptable.
llvm-svn: 192096
|
|
|
|
|
|
|
| |
This reverts commit r192070 which reverted r192069, I forgot to
regenerate the configure scripts.
llvm-svn: 192079
|
|
|
|
|
|
|
| |
This is causing MinGW bots to fail.
This reverts commit r192069.
llvm-svn: 192070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The MSVCRT deliberately sends main() code-page specific characters.
This isn't too useful to LLVM as we end up converting the arguments to
UTF-16 and subsequently attempt to use the result as, for example, a
file name. Instead, we need to have the ability to access the Unicode
command line and transform it to UTF-8.
This has the distinct advantage over using the MSVC-specific wmain()
function as our entry point because:
- It doesn't work on cygwin.
- It only work on MinGW with caveats and only then on certain versions.
- We get to keep our entry point as main(). :)
N.B. This patch includes fixes to other parts of lib/Support/Windows
s.t. we would be able to take advantage of getting the Unicode paths.
E.G. clang spawning clang -cc1 would want to give it Unicode arguments.
Reviewers: aaron.ballman, Bigcheese, rnk, ruiu
Reviewed By: rnk
CC: llvm-commits, ygao
Differential Revision: http://llvm-reviews.chandlerc.com/D1834
llvm-svn: 192069
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New ProcessInfo class to encapsulate information about child processes.
- Generalized the Wait() to support non-blocking wait on child processes.
- ExecuteNoWait() now returns a ProcessInfo object with information about
the launched child. Users will be able to use this object to
perform non-blocking wait.
- ExecuteNoWait() now accepts an ExecutionFailed param that tells if execution
failed or not.
These changes will allow users to implement basic process parallel
tools.
Differential Revision: http://llvm-reviews.chandlerc.com/D1728
llvm-svn: 191763
|
|
|
|
|
|
|
|
|
|
| |
work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will
"reset" if you shutdown llvm and try to come back for seconds. This is a subtle
behavior change, but I'm assuming that nobody is affected by it.
llvm-svn: 190946
|
|
|
|
|
|
|
|
| |
In some cases (e.g. when a build system pipes stderr) the Windows console
API cannot be used to color output. For these, provide a way to switch to
ANSI escape codes. This is required for Clang's -fansi-escape-codes option.
llvm-svn: 190460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, character encoding of multibyte environment variable varies
depending on settings. The only reliable way to handle it I think is to use
GetEnvironmentVariableW().
GetEnvironmentVariableW() works on wchar_t string, which is on Windows UTF16
string. That's not ideal because we use UTF-8 as the internal encoding in LLVM.
This patch defines a wrapper function which takes and returns UTF-8 string for
GetEnvironmentVariableW().
The wrapper function does not do any conversion and just forwards the argument
to getenv() on Unix.
Differential Revision: http://llvm-reviews.chandlerc.com/D1612
llvm-svn: 190423
|
|
|
|
|
|
| |
Cygwin and Win32.
llvm-svn: 189940
|
|
|
|
|
|
| |
contain Offset when Offset >= 65536.
llvm-svn: 189021
|
|
|
|
| |
llvm-svn: 189020
|
|
|
|
|
|
| |
string to UTF-8.
llvm-svn: 188566
|
|
|
|
| |
llvm-svn: 188565
|
|
|
|
| |
llvm-svn: 188554
|
|
|
|
|
|
|
|
|
|
|
| |
This allows llvm-tblgen to link successfully when compiling with clang.
Both MSBuild and CMake will automatically add advapi32 as part of a set
of other dlls comprising the win32 API to the link line, but CMake
doesn't do that when compiling with clang. Until someone adds that info
to cmake upstream, this seems like a reasonable work around.
llvm-svn: 187907
|
|
|
|
|
|
|
| |
One use needs to copy the alloca into a std::string, and the other use
is before calling CreateProcess, which is very heavyweight anyway.
llvm-svn: 187845
|
|
|
|
|
|
|
|
|
| |
The unix one was returning no_such_file_or_directory, but the windows one
was return success.
Update the one one caller that was depending on the old behavior.
llvm-svn: 187463
|
|
|
|
| |
llvm-svn: 187441
|
|
|
|
| |
llvm-svn: 187439
|
|
|
|
| |
llvm-svn: 187383
|
|
|
|
|
|
| |
This will let us use getUniqueID instead of st_dev directly on clang.
llvm-svn: 187378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove LLVM_ENABLE_CRT_REPORT. LLVM_DISABLE_CRASH_REPORT made it redundant.
* set Return to 1, so that we get a stack trace on failure.
* don't call _exit, so that we get a negative exit value and "not --crash"
correctly differentiates crashes and regular errors.
This is a bit experimental since the documentation on this interface is sparse.
It doesn't bring up a dialog on my windows setup, but feel free to revert
if it causes problem for your setup (and let me know what it is so that I
can try to fix this patch).
llvm-svn: 187206
|
|
|
|
| |
llvm-svn: 186684
|
|
|
|
|
|
| |
It is similar to 186511, but for creating files for writing.
llvm-svn: 186679
|
|
|
|
|
|
|
|
|
| |
* assert that the return value is one of the documented values on msdn.
* on FILE_TYPE_UNKNOWN, check GetLastError.
Unfortunately I can't think of a way to get a FILE_TYPE_UNKNOWN on a test.
llvm-svn: 186595
|
|
|
|
|
|
|
|
|
| |
file_type::fifo_file in sys::fs::getStatus(HANDLE).
It fixes llvm/test/Other/close-stderr.ll on msys.
FIXME: Provide unittests.
llvm-svn: 186588
|
|
|
|
| |
llvm-svn: 186561
|
|
|
|
| |
llvm-svn: 186532
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should fix the windows bots. It looks like the failing tests are of the
form
prog1 > file
prog2 file
and prog2 fails trying to read the file. The best fix would probably be to close
stdout/stderr in prog1, but it was not the intention of 186511 to change this,
so just restore the old behavior for now.
llvm-svn: 186530
|
|
|
|
|
|
|
|
|
|
|
| |
This has some advantages:
* Lets us use native, utf16 windows functions.
* Easy to produce good errors on windows about trying to use a
directory when we want a file.
* Simplifies the unix version a bit.
llvm-svn: 186511
|
|
|
|
| |
llvm-svn: 186413
|
|
|
|
| |
llvm-svn: 186378
|
|
|
|
|
|
|
| |
This opens the way of having static helpers in the .inc files that can
construct a file_status.
llvm-svn: 186376
|
|
|
|
| |
llvm-svn: 186310
|
|
|
|
| |
llvm-svn: 186301
|
|
|
|
|
|
| |
It fixes compatibility in llvm/test/Object/archive-toc.test.
llvm-svn: 186142
|
|
|
|
| |
llvm-svn: 186096
|
|
|
|
| |
llvm-svn: 186092
|
|
|
|
|
|
|
| |
While at it, use strftime on Unix too and use the thread safe versions
of localtime.
llvm-svn: 186090
|
|
|
|
|
|
|
|
|
|
| |
The status function is already using a syscall that returns the file size.
Remember it and implement file_size as a simple wrapper.
No functionally change, but clients that already use status now can avoid
calling file_size.
llvm-svn: 186016
|
|
|
|
| |
llvm-svn: 185834
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't try to create parent directories in unique_file. It had two problem:
* It violates the contract that it is atomic. If the directory creation
success and the file creation fails, we would return an error but the
file system was modified.
* When creating a temporary file clang would have to first check if the
parent directory existed or not to avoid creating one when it was not
supposed to.
* More efficient implementations of createUniqueDirectory and the unique_file
that produces only the file name. Now all 3 just call into a static
function passing what they want (name, file or directory).
Clang also has to be updated, so tests might fail if a bot picks up this commit
and not the corresponding clang one.
llvm-svn: 185126
|
|
|
|
| |
llvm-svn: 185015
|