Fix warning converting from boolean to pointer introduced in r301153.

This reverts commit r301155, which was incorrect.

llvm-svn: 301156
This commit is contained in:
Frederich Munch 2017-04-24 03:12:16 +00:00
parent c152a96350
commit 799259f320
2 changed files with 2 additions and 2 deletions

View File

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

View File

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