Reported by: David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254378
91177308-0d34-0410-b5e6-
96231b3b80d8
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".