[llvm] r257384 - Revert "[Windows] Simplify assertion code. NFC."
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 13:07:49 PST 2016
Author: rnk
Date: Mon Jan 11 15:07:48 2016
New Revision: 257384
URL: http://llvm.org/viewvc/llvm-project?rev=257384&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Support/Windows/Signals.inc
Modified: llvm/trunk/lib/Support/Windows/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.inc?rev=257384&r1=257383&r2=257384&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Signals.inc (original)
+++ llvm/trunk/lib/Support/Windows/Signals.inc Mon Jan 11 15:07:48 2016
@@ -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);
More information about the llvm-commits
mailing list