mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
[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:
@ -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
|
||||
|
Reference in New Issue
Block a user