Bug noticed, by inspection. Filename can be null.
authorChris Lattner <sabre@nondot.org>
Sun, 14 May 2006 19:00:53 +0000 (19:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 14 May 2006 19:00:53 +0000 (19:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28292 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/DynamicLibrary.cpp

index 056fed0eb38e5493a378704bb0df759f87861aff..9bec68e5a954e5291832a858f228a6c0fc023d69 100644 (file)
@@ -107,7 +107,8 @@ void DynamicLibrary::LoadLibraryPermanently(const char* filename) {
     a_handle = lt_dlopenext(filename);
 
   if (a_handle == 0)
-    throw std::string("Can't open :") + filename + ": " + lt_dlerror();
+    throw std::string("Can't open :") +
+          (filename ? filename : "<current process>") + ": " + lt_dlerror();
 
   lt_dlmakeresident(a_handle);