mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Provide hook for _alloca to make JITing on Cygwin slightly happier :)
llvm-svn: 44528
This commit is contained in:
parent
2a47f26d66
commit
ad4a61ed0b
@ -138,14 +138,15 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
extern void *SYM; if (!strcmp(symbolName, #SYM)) return &SYM
|
||||
|
||||
// If this is darwin, it has some funky issues, try to solve them here. Some
|
||||
// important symbols are marked 'private external' which doesn't allow
|
||||
// SearchForAddressOfSymbol to find them. As such, we special case them here,
|
||||
// there is only a small handful of them.
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
extern void *SYM; if (!strcmp(symbolName, #SYM)) return &SYM
|
||||
{
|
||||
EXPLICIT_SYMBOL(__ashldi3);
|
||||
EXPLICIT_SYMBOL(__ashrdi3);
|
||||
@ -163,9 +164,16 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
|
||||
EXPLICIT_SYMBOL(__udivdi3);
|
||||
EXPLICIT_SYMBOL(__umoddi3);
|
||||
}
|
||||
#undef EXPLICIT_SYMBOL
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
{
|
||||
EXPLICIT_SYMBOL(_alloca);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef EXPLICIT_SYMBOL
|
||||
|
||||
// This macro returns the address of a well-known, explicit symbol
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
if (!strcmp(symbolName, #SYM)) return &SYM
|
||||
|
Loading…
Reference in New Issue
Block a user