[cfe-commits] r117813 - in /cfe/trunk: examples/clang-interpreter/main.cpp tools/driver/driver.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Oct 30 10:32:40 PDT 2010


Author: d0k
Date: Sat Oct 30 12:32:40 2010
New Revision: 117813

URL: http://llvm.org/viewvc/llvm-project?rev=117813&view=rev
Log:
Turns out that we may end up calling dladdr on GetExecutablePath, give it external linkage to make sure the lookup works on all platforms.

Modified:
    cfe/trunk/examples/clang-interpreter/main.cpp
    cfe/trunk/tools/driver/driver.cpp

Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=117813&r1=117812&r2=117813&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Sat Oct 30 12:32:40 2010
@@ -32,7 +32,7 @@
 using namespace clang;
 using namespace clang::driver;
 
-static llvm::sys::Path GetExecutablePath(const char *Argv0) {
+llvm::sys::Path GetExecutablePath(const char *Argv0) {
   // This just needs to be some symbol in the binary; C++ doesn't
   // allow taking the address of ::main however.
   void *MainAddr = (void*) (intptr_t) GetExecutablePath;

Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=117813&r1=117812&r2=117813&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Sat Oct 30 12:32:40 2010
@@ -36,8 +36,7 @@
 using namespace clang;
 using namespace clang::driver;
 
-static llvm::sys::Path GetExecutablePath(const char *Argv0,
-                                         bool CanonicalPrefixes) {
+llvm::sys::Path GetExecutablePath(const char *Argv0, bool CanonicalPrefixes) {
   if (!CanonicalPrefixes)
     return llvm::sys::Path(Argv0);
 





More information about the cfe-commits mailing list