[llvm] r254378 - [Windows] Partially revert r254363 until I can test the right fix.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 21:33:25 PST 2015


Author: davide
Date: Mon Nov 30 23:33:24 2015
New Revision: 254378

URL: http://llvm.org/viewvc/llvm-project?rev=254378&view=rev
Log:
[Windows] Partially revert r254363 until I can test the right fix.

Reported by:  David Blaikie

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

Modified: llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/DynamicLibrary.inc?rev=254378&r1=254377&r2=254378&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/DynamicLibrary.inc (original)
+++ llvm/trunk/lib/Support/Windows/DynamicLibrary.inc Mon Nov 30 23:33:24 2015
@@ -60,8 +60,12 @@ DynamicLibrary DynamicLibrary::getPerman
     if (OpenedHandles == 0)
       OpenedHandles = new DenseSet<HMODULE>();
 
-    if (!fEnumerateLoadedModules)
-      assert(loadDebugHelp() && "These APIs should always be available");
+    if (!fEnumerateLoadedModules) {
+      if (!loadDebugHelp()) {
+        assert(false && "These APIs should always be available");
+        return DynamicLibrary();
+      }
+    }
 
     fEnumerateLoadedModules(GetCurrentProcess(), ELM_Callback, 0);
     // Dummy library that represents "search all handles".




More information about the llvm-commits mailing list