Author: asl Date: Sun Dec 2 23:30:41 2007 New Revision: 44528 URL: http://llvm.org/viewvc/llvm-project?rev=44528&view=rev Log: Provide hook for _alloca to make JITing on Cygwin slightly happier :)
Modified: llvm/trunk/lib/System/DynamicLibrary.cpp Modified: llvm/trunk/lib/System/DynamicLibrary.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/DynamicLibrary.cpp?rev=44528&r1=44527&r2=44528&view=diff ============================================================================== --- llvm/trunk/lib/System/DynamicLibrary.cpp (original) +++ llvm/trunk/lib/System/DynamicLibrary.cpp Sun Dec 2 23:30:41 2007 @@ -138,14 +138,15 @@ 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 @@ 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 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits