diff options
Diffstat (limited to 'llvm/lib/Support/DynamicLibrary.cpp')
-rw-r--r-- | llvm/lib/Support/DynamicLibrary.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/DynamicLibrary.cpp b/llvm/lib/Support/DynamicLibrary.cpp index e4a438585b8..82d7c0cc6d1 100644 --- a/llvm/lib/Support/DynamicLibrary.cpp +++ b/llvm/lib/Support/DynamicLibrary.cpp @@ -58,7 +58,7 @@ DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename, SmartScopedLock<true> lock(*SymbolsMutex); void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); - if (handle == nullptr) { + if (!handle) { if (errMsg) *errMsg = dlerror(); return DynamicLibrary(); } @@ -66,11 +66,11 @@ DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename, #ifdef __CYGWIN__ // Cygwin searches symbols only in the main // with the handle of dlopen(NULL, RTLD_GLOBAL). - if (filename == NULL) + if (!filename) handle = RTLD_DEFAULT; #endif - if (OpenedHandles == nullptr) + if (!OpenedHandles) OpenedHandles = new DenseSet<void *>(); // If we've already loaded this library, dlclose() the handle in order to |