From ed8c8fab46478302926233d2339c7c28b3711edc Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 1 Dec 2015 05:33:24 +0000 Subject: [PATCH] [Windows] Partially revert r254363 until I can test the right fix. Reported by: David Blaikie git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254378 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Windows/DynamicLibrary.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Support/Windows/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc index e612283e630..17418b015c7 100644 --- a/lib/Support/Windows/DynamicLibrary.inc +++ b/lib/Support/Windows/DynamicLibrary.inc @@ -60,8 +60,12 @@ DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename, if (OpenedHandles == 0) OpenedHandles = new DenseSet(); - 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". -- 2.34.1