From: Frederich Munch Date: Mon, 24 Apr 2017 03:12:16 +0000 (+0000) Subject: Fix warning converting from boolean to pointer introduced in r301153. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bffb4d4e84c51906d8d7951e1103e11df4732a4d;p=llvm Fix warning converting from boolean to pointer introduced in r301153. This reverts commit r301155, which was incorrect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301156 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp index 05e7ca630ec..1541a572630 100644 --- a/lib/Support/DynamicLibrary.cpp +++ b/lib/Support/DynamicLibrary.cpp @@ -61,7 +61,7 @@ public: Handles.push_back(Handle); } else { #ifndef LLVM_ON_WIN32 - if (Process != nullptr) { + if (Process) { if (CanClose) DLClose(Process); if (Process == Handle) diff --git a/lib/Support/Windows/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc index c9bd38ab76c..b43ae54cf85 100644 --- a/lib/Support/Windows/DynamicLibrary.inc +++ b/lib/Support/Windows/DynamicLibrary.inc @@ -61,7 +61,7 @@ void *DynamicLibrary::HandleSet::DLOpen(const char *File, std::string *Err) { static DynamicLibrary::HandleSet *IsOpenedHandlesInstance(void *Handle) { if (!OpenedHandles.isConstructed()) - return false; + return nullptr; DynamicLibrary::HandleSet &Inst = *OpenedHandles; return Handle == &Inst ? &Inst : nullptr; }