[C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-04-09 04:20:00 +00:00
parent e4d89ec8de
commit 725011e72f
19 changed files with 41 additions and 43 deletions

View File

@ -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