summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/DynamicLibrary.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-177/+0
| | | | llvm-svn: 120298
* Use thread-safe statics to avoid a static constructor here. This isn't ↵Owen Anderson2010-11-181-3/+15
| | | | | | | | thread-safe on MSVC, but we don't support threaded LLVM there anyways. llvm-svn: 119718
* Fix PR8441, a thread unsafe static variable in our dynamic library loading ↵Owen Anderson2010-11-091-0/+4
| | | | | | facilities. llvm-svn: 118463
* Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp onChris Lattner2010-08-171-0/+6
| | | | | | cygwin when built with ENABLE_SHARED=1. Patch by NAKAMURA Takumi! llvm-svn: 111231
* Fix a bunch of namespace polution.Dan Gohman2010-04-151-2/+8
| | | | llvm-svn: 101376
* add minix support, patch by Kees van Reeuwijk! PR6797Chris Lattner2010-04-091-0/+14
| | | | llvm-svn: 100895
* Make clang bootstrap happier on OSX 10.5 by reducing the number of headersJeffrey Yasskin2010-03-111-39/+3
| | | | | | | | | included when using global symbols to ask the linker for the addresses of various functions. One of the symbols was actually getting declared by a header included in DynamicLibrary.cpp, which conflicted with the "extern void*" declaration in SearchForAddressOfSpecialSymbol(). llvm-svn: 98243
* Alternative fix to make sure that the extern declarations used byDouglas Gregor2009-12-231-23/+29
| | | | | | | DynamicLibrary::SearchForAddressOfSymbol refer to declarations in the global namespace. llvm-svn: 92023
* Revert 92020 until I figure out a more portable fixDouglas Gregor2009-12-231-6/+28
| | | | llvm-svn: 92021
* Move the extern symbol declarations outside ofDouglas Gregor2009-12-231-28/+6
| | | | | | | | | | | | | DynamicLibrary::SearchForAddressOfSymbol and force them to have "C" linkage. Interestingly, GCC treats the block-scoped "extern" declarations we previously had as if they were extern "C" declarations (or, at least, were in the global namespace), so that GCC bug papered over this LLVM bug. Clang and EDG get the linkage correct; this new variant seems to work for both GCC and Clang. llvm-svn: 92020
* Remove unused includes.Chandler Carruth2009-10-251-1/+0
| | | | llvm-svn: 85074
* Fix ExplicitSymbols leak.Torok Edwin2009-08-311-0/+7
| | | | llvm-svn: 80589
* Eliminate the static constructors and locks from DynamicLibrary.cpp.Chris Lattner2009-07-071-26/+27
| | | | | | | | | | | | | | | | | | This fixes PR4512 and eliminating static ctors is always good. Losing thread safety is unfortunate, but the code is just incredibly poorly designed. If someone is interested, the "right" solution is to split DynamicLibrary.cpp into two separate pieces: a stateless piece in libsystem, and a simple support file in libsupport that has the "state" (e.g. AddSymbol) in managed static objects. Doing this would both fix memory leaks we already have, as well as make the code thread safe again. it would also make sense to move all the unix specific code in System/DynamicLibrary.cpp into System/Unix/DynamicLibrary.inc. llvm-svn: 74927
* remove dead code, noone creates instances of "DynamicLibrary", so the ctor ↵Chris Lattner2009-07-071-10/+1
| | | | | | and dtor are dead. llvm-svn: 74926
* we don't use libtool anymore, update comments.Chris Lattner2009-07-071-12/+2
| | | | llvm-svn: 74924
* Guard dynamic library loading.Owen Anderson2009-06-251-9/+21
| | | | | | | I did my best at implementing this for Win32, but I don't have a way to test it. Can someone with access to a Win32 machine test/fix this? llvm-svn: 74188
* Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!Chris Lattner2009-01-291-4/+7
| | | | llvm-svn: 63269
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-081-0/+1
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* open plugins with RTLD_GLOBAL, pointed out by Bram Adams.Chris Lattner2008-07-101-1/+1
| | | | llvm-svn: 53385
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-2/+0
| | | | llvm-svn: 50695
* Remove unused GetAddressOfSymbol()Devang Patel2008-03-131-6/+1
| | | | | | Thanks Daniel Dunbar! llvm-svn: 48340
* This is a simple fix for getting error messages from dlerror inChris Lattner2008-03-121-1/+2
| | | | | | | | | LoadLibraryPermanently. The current code modifies the value of a pointer that is passed by value, so the caller never gets the message. Patch by Julien Lerouge! llvm-svn: 48270
* Provide __main hooks for cygwin & mingw32Anton Korobeynikov2008-02-221-0/+1
| | | | llvm-svn: 47479
* Remove use of ltdlDevang Patel2008-02-131-69/+17
| | | | llvm-svn: 47065
* Fix compile failures with g++-4.3.Duncan Sands2008-01-091-0/+1
| | | | llvm-svn: 45781
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Provide hook for _alloca to make JITing on Cygwin slightly happier :)Anton Korobeynikov2007-12-031-3/+11
| | | | llvm-svn: 44528
* really fix PR1581, thanks to Daniel Dunbar for pointingChris Lattner2007-09-281-1/+1
| | | | | | this out. llvm-svn: 42448
* Fix PR1581, patch by Timo SavolaChris Lattner2007-07-311-1/+1
| | | | llvm-svn: 40616
* silence warningChris Lattner2007-02-011-0/+1
| | | | llvm-svn: 33746
* Unbreak Darwin.Reid Spencer2007-01-191-3/+0
| | | | llvm-svn: 33375
* Help the lli interpreter find the stderr/stdin/stdout symbols. These areReid Spencer2007-01-191-3/+19
| | | | | | | needed for output to be generated. On Linux these are both global vars and macro definitions so we have to special case Linux. llvm-svn: 33374
* Handle each of stderr/stdin/stdout separately.Reid Spencer2007-01-191-0/+4
| | | | llvm-svn: 33373
* Avoid taking the address of a macro by checking to see if stdin is definedReid Spencer2007-01-111-0/+4
| | | | | | or not. This allows DynamicLibrary.cpp to compile on Darwin. llvm-svn: 33064
* Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This isReid Spencer2007-01-101-2/+12
| | | | | | a bit of a hack but it lets some of the llvm-test programs run. llvm-svn: 33058
* Guess what happens when asserts are disabled. :(Chris Lattner2006-08-301-1/+2
| | | | | | Also, the assert could never fire due to || instead of &&. llvm-svn: 29977
* For PR797:Reid Spencer2006-08-251-6/+5
| | | | | | | | | | | | | | | Final commit for this bug. This removes the last EH holdouts in LLVM and turns off exception support by using the -fno-exceptions option. This leads to the following reduction in library and executable sizes: DEBUG BUILD RELEASE BUILD before after delta before after delta lib 162,328K 157,616K 4,712 17,864K 16,416K 1,448K bin 571,444K 557,156K 14,288 63,296K 56,996K 6,300K Debug Improvement: 19,000K (2.59%) Release Improvement: 7,748K (9.55%) llvm-svn: 29882
* For PR780:Reid Spencer2006-07-261-0/+2
| | | | | | | | | Put the rest of lib/System into LinkAllVMCore.h. This makes all of lib/System available to programs that #include LinkALlVMCore.h so that loadable modules linked into those programs can depend on all of lib/System being available. llvm-svn: 29288
* Change LoadLibraryPermanently to not throw an exception.Chris Lattner2006-07-071-7/+13
| | | | llvm-svn: 29048
* Bug noticed, by inspection. Filename can be null.Chris Lattner2006-05-141-1/+2
| | | | llvm-svn: 28292
* Fix iterator invalidation bug, identified by Coverity.Chris Lattner2006-05-121-0/+1
| | | | llvm-svn: 28257
* Add AddSymbol() method to DynamicLibrary to work around Windows limitationJeff Cohen2006-01-301-0/+15
| | | | | | | of being unable to search for symbols in an EXE. It will also allow other existing hacks to be improved. llvm-svn: 25805
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21422
* Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer2005-01-091-1/+1
| | | | | | | gdb debugger doesn't get confused on which file it is reading (the one in lib/System or the one in lib/System/{Win32,Unix}) llvm-svn: 19426
* Correct the case of a #include directory name, just in case.Reid Spencer2005-01-021-1/+1
| | | | llvm-svn: 19254
* Get VC++ building againJeff Cohen2004-12-241-2/+3
| | | | llvm-svn: 19140
* Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,Jeff Cohen2004-12-241-0/+14
| | | | | | ltdl's LGPL license would infect all of LLVM. llvm-svn: 19137
* Fix compilation error on Darwin.Chris Lattner2004-12-041-15/+18
| | | | llvm-svn: 18485
* Move darwin-specific majik here.Chris Lattner2004-12-031-5/+27
| | | | llvm-svn: 18466
* Implement two new functions: LoadLibraryPermanently andReid Spencer2004-11-291-28/+62
| | | | | | SearchForAddressOfSymbol. llvm-svn: 18355
OpenPOWER on IntegriCloud