aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/System/DynamicLibrary.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-10-25Remove unused includes.Chandler Carruth1-1/+0
llvm-svn: 85074
2009-08-31Fix ExplicitSymbols leak.Torok Edwin1-0/+7
llvm-svn: 80589
2009-07-07Eliminate the static constructors and locks from DynamicLibrary.cpp.Chris Lattner1-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
2009-07-07remove dead code, noone creates instances of "DynamicLibrary", so the ctor ↵Chris Lattner1-10/+1
and dtor are dead. llvm-svn: 74926
2009-07-07we don't use libtool anymore, update comments.Chris Lattner1-12/+2
llvm-svn: 74924
2009-06-25Guard dynamic library loading.Owen Anderson1-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
2009-01-29Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!Chris Lattner1-4/+7
llvm-svn: 63269
2008-10-08Add <cstdio> include where needed by gcc-4.4.Duncan Sands1-0/+1
Patch by Samuel Tardieu. llvm-svn: 57291
2008-07-10open plugins with RTLD_GLOBAL, pointed out by Bram Adams.Chris Lattner1-1/+1
llvm-svn: 53385
2008-05-06Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman1-2/+0
llvm-svn: 50695
2008-03-13Remove unused GetAddressOfSymbol()Devang Patel1-6/+1
Thanks Daniel Dunbar! llvm-svn: 48340
2008-03-12This is a simple fix for getting error messages from dlerror inChris Lattner1-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
2008-02-22Provide __main hooks for cygwin & mingw32Anton Korobeynikov1-0/+1
llvm-svn: 47479
2008-02-13Remove use of ltdlDevang Patel1-69/+17
llvm-svn: 47065
2008-01-09Fix compile failures with g++-4.3.Duncan Sands1-0/+1
llvm-svn: 45781
2007-12-29Remove attribution from file headers, per discussion on llvmdev.Chris Lattner1-2/+2
llvm-svn: 45418
2007-12-03Provide hook for _alloca to make JITing on Cygwin slightly happier :)Anton Korobeynikov1-3/+11
llvm-svn: 44528
2007-09-28really fix PR1581, thanks to Daniel Dunbar for pointingChris Lattner1-1/+1
this out. llvm-svn: 42448
2007-07-31Fix PR1581, patch by Timo SavolaChris Lattner1-1/+1
llvm-svn: 40616
2007-02-01silence warningChris Lattner1-0/+1
llvm-svn: 33746
2007-01-19Unbreak Darwin.Reid Spencer1-3/+0
llvm-svn: 33375
2007-01-19Help the lli interpreter find the stderr/stdin/stdout symbols. These areReid Spencer1-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
2007-01-19Handle each of stderr/stdin/stdout separately.Reid Spencer1-0/+4
llvm-svn: 33373
2007-01-11Avoid taking the address of a macro by checking to see if stdin is definedReid Spencer1-0/+4
or not. This allows DynamicLibrary.cpp to compile on Darwin. llvm-svn: 33064
2007-01-10Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This isReid Spencer1-2/+12
a bit of a hack but it lets some of the llvm-test programs run. llvm-svn: 33058
2006-08-30Guess what happens when asserts are disabled. :(Chris Lattner1-1/+2
Also, the assert could never fire due to || instead of &&. llvm-svn: 29977
2006-08-25For PR797:Reid Spencer1-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
2006-07-26For PR780:Reid Spencer1-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
2006-07-07Change LoadLibraryPermanently to not throw an exception.Chris Lattner1-7/+13
llvm-svn: 29048
2006-05-14Bug noticed, by inspection. Filename can be null.Chris Lattner1-1/+2
llvm-svn: 28292
2006-05-12Fix iterator invalidation bug, identified by Coverity.Chris Lattner1-0/+1
llvm-svn: 28257
2006-01-30Add AddSymbol() method to DynamicLibrary to work around Windows limitationJeff Cohen1-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
2005-04-21Remove trailing whitespaceMisha Brukman1-5/+5
llvm-svn: 21422
2005-01-09Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer1-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
2005-01-02Correct the case of a #include directory name, just in case.Reid Spencer1-1/+1
llvm-svn: 19254
2004-12-24Get VC++ building againJeff Cohen1-2/+3
llvm-svn: 19140
2004-12-24Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,Jeff Cohen1-0/+14
ltdl's LGPL license would infect all of LLVM. llvm-svn: 19137
2004-12-04Fix compilation error on Darwin.Chris Lattner1-15/+18
llvm-svn: 18485
2004-12-03Move darwin-specific majik here.Chris Lattner1-5/+27
llvm-svn: 18466
2004-11-29Implement two new functions: LoadLibraryPermanently andReid Spencer1-28/+62
SearchForAddressOfSymbol. llvm-svn: 18355
2004-11-29We just use ltdl's implementation for this abstraction now. Its portable toReid Spencer1-13/+3
more platforms than LLVM supports. llvm-svn: 18352
2004-11-29Implement the default constructor which causes the current program to beReid Spencer1-0/+10
opened as if it was a dynamic library so its symbols can be searched too. llvm-svn: 18341
2004-11-18Dynamic Library abstraction. This makes the abstraction of a single dynamicReid Spencer1-0/+78
library (shared library/shared object) whose symbols can be looked up dynamically. Used for plug-ins. llvm-svn: 17940