From 0bd34e693f223908930aa924e28e4cf23ba46c24 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 11 Jan 2016 21:07:48 +0000 Subject: [PATCH] Revert "[Windows] Simplify assertion code. NFC." This reverts commit r254363. load64BitDebugHelp() has the side effect of loading dbghelp and setting globals. It should be called in no-asserts builds as well as debug builds. llvm_unreachable is also not appropriate here, since we actually want to return if dbghelp couldn't be loaded in a non-asserts build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257384 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Windows/Signals.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Support/Windows/Signals.inc b/lib/Support/Windows/Signals.inc index d109a66d703..f40ca72996a 100644 --- a/lib/Support/Windows/Signals.inc +++ b/lib/Support/Windows/Signals.inc @@ -405,7 +405,10 @@ static void RegisterHandler() { // If we cannot load up the APIs (which would be unexpected as they should // exist on every version of Windows we support), we will bail out since // there would be nothing to report. - assert(load64BitDebugHelp() && "These APIs should always be available"); + if (!load64BitDebugHelp()) { + assert(false && "These APIs should always be available"); + return; + } if (RegisteredUnhandledExceptionFilter) { EnterCriticalSection(&CriticalSection); -- 2.34.1