[llvm] r301156 - Fix warning converting from boolean to pointer introduced in r301153.

Frederich Munch via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 20:12:16 PDT 2017


Author: marsupial
Date: Sun Apr 23 22:12:16 2017
New Revision: 301156

URL: http://llvm.org/viewvc/llvm-project?rev=301156&view=rev
Log:
Fix warning converting from boolean to pointer introduced in r301153.

This reverts commit r301155, which was incorrect.

Modified:
    llvm/trunk/lib/Support/DynamicLibrary.cpp
    llvm/trunk/lib/Support/Windows/DynamicLibrary.inc

Modified: llvm/trunk/lib/Support/DynamicLibrary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/DynamicLibrary.cpp?rev=301156&r1=301155&r2=301156&view=diff
==============================================================================
--- llvm/trunk/lib/Support/DynamicLibrary.cpp (original)
+++ llvm/trunk/lib/Support/DynamicLibrary.cpp Sun Apr 23 22:12:16 2017
@@ -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)

Modified: llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/DynamicLibrary.inc?rev=301156&r1=301155&r2=301156&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/DynamicLibrary.inc (original)
+++ llvm/trunk/lib/Support/Windows/DynamicLibrary.inc Sun Apr 23 22:12:16 2017
@@ -61,7 +61,7 @@ void *DynamicLibrary::HandleSet::DLOpen(
 
 static DynamicLibrary::HandleSet *IsOpenedHandlesInstance(void *Handle) {
   if (!OpenedHandles.isConstructed())
-    return false;
+    return nullptr;
   DynamicLibrary::HandleSet &Inst = *OpenedHandles;
   return Handle == &Inst ? &Inst : nullptr;
 }




More information about the llvm-commits mailing list