diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-09 04:20:00 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-09 04:20:00 +0000 |
commit | 8d399f87af9e98b1103ba794bcda4b33ff534f65 (patch) | |
tree | 61a5a0e459a82e1ecc9fc852c3a920269bd6a59f /llvm/lib/Support/DynamicLibrary.cpp | |
parent | c65a56901f6235739b6362a4f787ef609daa5ddd (diff) | |
download | bcm5719-llvm-8d399f87af9e98b1103ba794bcda4b33ff534f65.tar.gz bcm5719-llvm-8d399f87af9e98b1103ba794bcda4b33ff534f65.zip |
[C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity.
llvm-svn: 205829
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 |