[llvm-commits] [llvm] r92021 - in /llvm/trunk/lib/System: DynamicLibrary.cpp DynamicLibrarySymbolDefs.def
Douglas Gregor
dgregor at apple.com
Wed Dec 23 11:04:11 PST 2009
Author: dgregor
Date: Wed Dec 23 13:04:10 2009
New Revision: 92021
URL: http://llvm.org/viewvc/llvm-project?rev=92021&view=rev
Log:
Revert 92020 until I figure out a more portable fix
Removed:
llvm/trunk/lib/System/DynamicLibrarySymbolDefs.def
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=92021&r1=92020&r2=92021&view=diff
==============================================================================
--- llvm/trunk/lib/System/DynamicLibrary.cpp (original)
+++ llvm/trunk/lib/System/DynamicLibrary.cpp Wed Dec 23 13:04:10 2009
@@ -69,10 +69,6 @@
return false;
}
-#define EXPLICIT_SYMBOL(SYM) \
- extern "C" void *SYM;
-#include "DynamicLibrarySymbolDefs.def"
-
void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
// First check symbols added via AddSymbol().
if (ExplicitSymbols) {
@@ -97,15 +93,41 @@
}
#define EXPLICIT_SYMBOL(SYM) \
- if (!strcmp(symbolName, #SYM)) return &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__
+ {
+ EXPLICIT_SYMBOL(__ashldi3);
+ EXPLICIT_SYMBOL(__ashrdi3);
+ EXPLICIT_SYMBOL(__cmpdi2);
+ EXPLICIT_SYMBOL(__divdi3);
+ EXPLICIT_SYMBOL(__eprintf);
+ EXPLICIT_SYMBOL(__fixdfdi);
+ EXPLICIT_SYMBOL(__fixsfdi);
+ EXPLICIT_SYMBOL(__fixunsdfdi);
+ EXPLICIT_SYMBOL(__fixunssfdi);
+ EXPLICIT_SYMBOL(__floatdidf);
+ EXPLICIT_SYMBOL(__floatdisf);
+ EXPLICIT_SYMBOL(__lshrdi3);
+ EXPLICIT_SYMBOL(__moddi3);
+ EXPLICIT_SYMBOL(__udivdi3);
+ EXPLICIT_SYMBOL(__umoddi3);
+ }
+#endif
+
+#ifdef __CYGWIN__
{
-#include "DynamicLibrarySymbolDefs.def"
+ EXPLICIT_SYMBOL(_alloca);
+ EXPLICIT_SYMBOL(__main);
}
+#endif
+
+#undef EXPLICIT_SYMBOL
// This macro returns the address of a well-known, explicit symbol
#define EXPLICIT_SYMBOL(SYM) \
Removed: llvm/trunk/lib/System/DynamicLibrarySymbolDefs.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/DynamicLibrarySymbolDefs.def?rev=92020&view=auto
==============================================================================
--- llvm/trunk/lib/System/DynamicLibrarySymbolDefs.def (original)
+++ llvm/trunk/lib/System/DynamicLibrarySymbolDefs.def (removed)
@@ -1,41 +0,0 @@
-//===-- DynamicLibrarySymbolDefs.def - Extra symbol definitions -*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file enumerates the set of extra external symbol definitions needed for
-// dynamic libraries.
-//
-//===----------------------------------------------------------------------===//
-#ifndef EXPLICIT_SYMBOL
-# error Must define EXPLICIT_SYMBOL to include this definitions file
-#endif
-
-#ifdef __APPLE__
-EXPLICIT_SYMBOL(__ashldi3)
-EXPLICIT_SYMBOL(__ashrdi3)
-EXPLICIT_SYMBOL(__cmpdi2)
-EXPLICIT_SYMBOL(__divdi3)
-EXPLICIT_SYMBOL(__eprintf)
-EXPLICIT_SYMBOL(__fixdfdi)
-EXPLICIT_SYMBOL(__fixsfdi)
-EXPLICIT_SYMBOL(__fixunsdfdi)
-EXPLICIT_SYMBOL(__fixunssfdi)
-EXPLICIT_SYMBOL(__floatdidf)
-EXPLICIT_SYMBOL(__floatdisf)
-EXPLICIT_SYMBOL(__lshrdi3)
-EXPLICIT_SYMBOL(__moddi3)
-EXPLICIT_SYMBOL(__udivdi3)
-EXPLICIT_SYMBOL(__umoddi3)
-#endif
-
-#ifdef __CYGWIN__
-EXPLICIT_SYMBOL(_alloca)
-EXPLICIT_SYMBOL(__main)
-#endif
-
-#undef EXPLICIT_SYMBOL
More information about the llvm-commits
mailing list