llvm/unittests
Frederich Munch 545de00b4b 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301153 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 02:30:12 +00:00
..
ADT [APInt] In sext single word case, use SignExtend64 and let the APInt constructor mask off any excess bits. 2017-04-23 17:16:24 +00:00
Analysis [SCEV] Add a local cache for getZeroExtendExpr and getSignExtendExpr to prevent 2017-04-17 20:40:05 +00:00
AsmParser
Bitcode Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"" 2017-01-04 22:36:33 +00:00
CodeGen [SVE] Fix mismatched sign comparison warning in unit test from r300842. 2017-04-20 16:54:49 +00:00
DebugInfo Remove the unnecessary virtual dtor from the DIEUnit hierarchy (in favor of protected dtor in the base, final derived classes with public non-virtual dtors) 2017-04-22 02:18:00 +00:00
ExecutionEngine [IR] Make paramHasAttr to use arg indices instead of attr indices 2017-04-14 20:19:02 +00:00
IR [APInt] Cast more calls to add/sub/mul overflow functions to void. I missed the unittests in r300758. 2017-04-19 22:11:05 +00:00
LineEditor
Linker Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
MC Fix static initialization order fiasco in MCTests 2016-11-11 22:18:42 +00:00
MI Fix subreg value numbers in handleMoveUp 2017-03-11 00:14:52 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
ProfileData Fix signed/unsigned comparison warning 2017-03-11 19:38:22 +00:00
Support Refactor DynamicLibrary so searching for a symbol will have a defined order and 2017-04-24 02:30:12 +00:00
Target Remove a FIXME that I forgot about. NFC. 2016-10-13 05:28:55 +00:00
Transforms Prefer addAttr(Attribute::AttrKind) over the AttributeList overload 2017-04-19 17:28:52 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt [XRay] A graph Class for the llvm-xray graph 2017-02-10 06:36:08 +00:00