[cfe-commits] [libcxxabi] r164404 - /libcxxabi/trunk/src/stdexcept.cpp

Howard Hinnant hhinnant at apple.com
Fri Sep 21 12:12:56 PDT 2012


Author: hhinnant
Date: Fri Sep 21 14:12:56 2012
New Revision: 164404

URL: http://llvm.org/viewvc/llvm-project?rev=164404&view=rev
Log:
Tweak use of dlopen to be a little more correct and higher performing.

Modified:
    libcxxabi/trunk/src/stdexcept.cpp

Modified: libcxxabi/trunk/src/stdexcept.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/stdexcept.cpp?rev=164404&r1=164403&r2=164404&view=diff
==============================================================================
--- libcxxabi/trunk/src/stdexcept.cpp (original)
+++ libcxxabi/trunk/src/stdexcept.cpp Fri Sep 21 14:12:56 2012
@@ -44,7 +44,7 @@
     const void*
     compute_gcc_empty_string_storage() _LIBCPP_CANTTHROW
     {
-        void* handle = dlopen("libstdc++.dylib", RTLD_LAZY);
+        void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
         if (handle == 0)
             return 0;
         return (const char*)dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE") + offset;





More information about the cfe-commits mailing list