Bug noticed, by inspection. Filename can be null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-05-14 19:00:53 +00:00
parent 505f9c8839
commit f883eb94e0

View 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);