1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

50 Commits

Author SHA1 Message Date
Chris Lattner
f403684a4d Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp on
cygwin when built with ENABLE_SHARED=1.  Patch by NAKAMURA Takumi!

llvm-svn: 111231
2010-08-17 15:42:43 +00:00
Dan Gohman
d48633d340 Fix a bunch of namespace polution.
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Chris Lattner
9d77e5ba47 add minix support, patch by Kees van Reeuwijk! PR6797
llvm-svn: 100895
2010-04-09 20:45:04 +00:00
Jeffrey Yasskin
46115632ba Make clang bootstrap happier on OSX 10.5 by reducing the number of headers
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
2010-03-11 06:14:32 +00:00
Douglas Gregor
0f306eba2f Alternative fix to make sure that the extern declarations used by
DynamicLibrary::SearchForAddressOfSymbol refer to declarations in the
global namespace.

llvm-svn: 92023
2009-12-23 19:12:50 +00:00
Douglas Gregor
44f2fe915f Revert 92020 until I figure out a more portable fix
llvm-svn: 92021
2009-12-23 19:04:10 +00:00
Douglas Gregor
9f306d1b18 Move the extern symbol declarations outside of
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
2009-12-23 18:56:27 +00:00
Chandler Carruth
6e9cf74969 Remove unused includes.
llvm-svn: 85074
2009-10-25 22:38:41 +00:00
Torok Edwin
fbeacd1ab7 Fix ExplicitSymbols leak.
llvm-svn: 80589
2009-08-31 16:12:29 +00:00
Chris Lattner
ccaba64332 Eliminate the static constructors and locks from DynamicLibrary.cpp.
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-07 18:17:07 +00:00
Chris Lattner
b11fca33f8 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
llvm-svn: 74926
2009-07-07 18:01:58 +00:00
Chris Lattner
5d45e95584 we don't use libtool anymore, update comments.
llvm-svn: 74924
2009-07-07 17:50:11 +00:00
Owen Anderson
d1598408ce Guard dynamic library loading.
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-06-25 18:12:44 +00:00
Chris Lattner
d5591247d1 Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!
llvm-svn: 63269
2009-01-29 04:43:42 +00:00
Duncan Sands
8f296a3788 Add <cstdio> include where needed by gcc-4.4.
Patch by Samuel Tardieu.

llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Chris Lattner
5e57a12a80 open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
llvm-svn: 53385
2008-07-10 00:52:20 +00:00
Dan Gohman
a84b75df17 Remove uses of llvm/System/IncludeFile.h that are no longer needed.
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Devang Patel
2c38efe128 Remove unused GetAddressOfSymbol()
Thanks Daniel Dunbar!

llvm-svn: 48340
2008-03-13 16:55:34 +00:00
Chris Lattner
1eca74f70e This is a simple fix for getting error messages from dlerror in
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-03-12 00:50:01 +00:00
Anton Korobeynikov
ca51f9e5f0 Provide __main hooks for cygwin & mingw32
llvm-svn: 47479
2008-02-22 10:08:31 +00:00
Devang Patel
8190e4fbe0 Remove use of ltdl
llvm-svn: 47065
2008-02-13 17:11:39 +00:00
Duncan Sands
e97a9a373a Fix compile failures with g++-4.3.
llvm-svn: 45781
2008-01-09 19:42:09 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Anton Korobeynikov
ad4a61ed0b Provide hook for _alloca to make JITing on Cygwin slightly happier :)
llvm-svn: 44528
2007-12-03 05:30:41 +00:00
Chris Lattner
920bede750 really fix PR1581, thanks to Daniel Dunbar for pointing
this out.

llvm-svn: 42448
2007-09-28 20:50:50 +00:00
Chris Lattner
eb42bcd78a Fix PR1581, patch by Timo Savola
llvm-svn: 40616
2007-07-31 06:00:51 +00:00
Chris Lattner
51faab4a6f silence warning
llvm-svn: 33746
2007-02-01 04:57:00 +00:00
Reid Spencer
b2b35908d6 Unbreak Darwin.
llvm-svn: 33375
2007-01-19 22:04:24 +00:00
Reid Spencer
2b799d8208 Help the lli interpreter find the stderr/stdin/stdout symbols. These are
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-19 21:41:04 +00:00
Reid Spencer
5d29c5a81b Handle each of stderr/stdin/stdout separately.
llvm-svn: 33373
2007-01-19 21:30:39 +00:00
Reid Spencer
0f61503a7e Avoid taking the address of a macro by checking to see if stdin is defined
or not. This allows DynamicLibrary.cpp to compile on Darwin.

llvm-svn: 33064
2007-01-11 00:35:10 +00:00
Reid Spencer
94ddfbe8b8 Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This is
a bit of a hack but it lets some of the llvm-test programs run.

llvm-svn: 33058
2007-01-10 19:50:43 +00:00
Chris Lattner
3530cfb3c3 Guess what happens when asserts are disabled. :(
Also, the assert could never fire due to || instead of &&.

llvm-svn: 29977
2006-08-30 20:37:06 +00:00
Reid Spencer
e2b7b29a82 For PR797:
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-08-25 19:54:53 +00:00
Reid Spencer
c2eb650e39 For PR780:
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-26 16:55:39 +00:00
Chris Lattner
832e60566f Change LoadLibraryPermanently to not throw an exception.
llvm-svn: 29048
2006-07-07 17:12:36 +00:00
Chris Lattner
d639e0fbce Bug noticed, by inspection. Filename can be null.
llvm-svn: 28292
2006-05-14 19:00:53 +00:00
Chris Lattner
acd1bbfff7 Fix iterator invalidation bug, identified by Coverity.
llvm-svn: 28257
2006-05-12 18:13:11 +00:00
Jeff Cohen
d80b0d7375 Add AddSymbol() method to DynamicLibrary to work around Windows limitation
of being unable to search for symbols in an EXE.  It will also allow other
existing hacks to be improved.

llvm-svn: 25805
2006-01-30 04:33:51 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Reid Spencer
283688b80d Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the silly
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-09 23:29:00 +00:00
Reid Spencer
110e76fd79 Correct the case of a #include directory name, just in case.
llvm-svn: 19254
2005-01-02 09:45:04 +00:00
Jeff Cohen
724ac32c61 Get VC++ building again
llvm-svn: 19140
2004-12-24 16:26:47 +00:00
Jeff Cohen
f3543c32a5 Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM.

llvm-svn: 19137
2004-12-24 07:57:09 +00:00
Chris Lattner
66d0cdd8ec Fix compilation error on Darwin.
llvm-svn: 18485
2004-12-04 04:17:20 +00:00
Chris Lattner
c8009d368d Move darwin-specific majik here.
llvm-svn: 18466
2004-12-03 23:02:42 +00:00
Reid Spencer
66b4a250cf Implement two new functions: LoadLibraryPermanently and
SearchForAddressOfSymbol.

llvm-svn: 18355
2004-11-29 13:33:28 +00:00
Reid Spencer
c0b0d036b3 We just use ltdl's implementation for this abstraction now. Its portable to
more platforms than LLVM supports.

llvm-svn: 18352
2004-11-29 12:39:10 +00:00
Reid Spencer
9e369115fc Implement the default constructor which causes the current program to be
opened as if it was a dynamic library so its symbols can be searched too.

llvm-svn: 18341
2004-11-29 10:39:46 +00:00
Reid Spencer
c1871a4eaa Dynamic Library abstraction. This makes the abstraction of a single dynamic
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.

llvm-svn: 17940
2004-11-18 04:33:39 +00:00