aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-14 19:00:53 +0000
committerChris Lattner <sabre@nondot.org>2006-05-14 19:00:53 +0000
commitf883eb94e00d861927bcaed96fc1f2a63bbc865c (patch)
treef67c33d741dbf60673d9d2b36bb74c168a9f4f0f
parent505f9c88397ffb036c41018abb4112958b487fe3 (diff)
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
-rw-r--r--lib/System/DynamicLibrary.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/System/DynamicLibrary.cpp b/lib/System/DynamicLibrary.cpp
index 056fed0eb3..9bec68e5a9 100644
--- a/lib/System/DynamicLibrary.cpp
+++ b/lib/System/DynamicLibrary.cpp
@@ -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);