llvm-project/llvm/lib/Support/Windows
Frederich Munch c1db8cf9c1 Refactor DynamicLibrary so searching for a symbol will have a defined order and
libraries are properly unloaded when llvm_shutdown is called.

Summary:
This was mostly affecting usage of the JIT, where storing the library handles in
a set made iteration unordered/undefined. This lead to disagreement between the
JIT and native code as to what the address and implementation of particularly on
Windows with stdlib functions:

JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s
JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv
Native: getenv("TEST") -> NULL // called ucrt.dll, getenv

Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows
not giving priority to the process' symbols as it did on Unix.

Reviewers: chapuni, v.g.vassilev, lhames

Reviewed By: lhames

Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D30107

llvm-svn: 301562
2017-04-27 16:55:24 +00:00
..
COM.inc Windows/COM.inc: Fix emacs mode in the first line. 2015-08-05 06:11:08 +00:00
DynamicLibrary.inc Refactor DynamicLibrary so searching for a symbol will have a defined order and 2017-04-27 16:55:24 +00:00
Host.inc
Memory.inc Add Windows error code and tidy formatting for system errors. 2015-11-23 17:34:20 +00:00
Mutex.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Path.inc [Support] Fill the file_status struct with link count. 2017-03-20 23:55:20 +00:00
Process.inc Do not pollute the namespace in a header file. 2017-03-31 13:48:21 +00:00
Program.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
RWMutex.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Signals.inc Remove name space pollution from Signals.cpp 2017-03-31 14:58:52 +00:00
ThreadLocal.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Threading.inc Fix C2712 build error on Windows 2017-03-07 20:09:46 +00:00
Watchdog.inc
WindowsSupport.h Removed FIXME from include ordering comment 2016-10-24 17:15:05 +00:00
explicit_symbols.inc