From 8d399f87af9e98b1103ba794bcda4b33ff534f65 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 9 Apr 2014 04:20:00 +0000 Subject: [C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity. llvm-svn: 205829 --- llvm/lib/Support/DynamicLibrary.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Support/DynamicLibrary.cpp') 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 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(); // If we've already loaded this library, dlclose() the handle in order to -- cgit v1.2.3