summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Signals.inc
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-01-11 21:07:48 +0000
committerReid Kleckner <rnk@google.com>2016-01-11 21:07:48 +0000
commit6cdf844d75806bbac13bb5bb670198697e0a0d43 (patch)
tree5b310fa590418a9c52d8b5fa28b65d8320c5b0e7 /llvm/lib/Support/Windows/Signals.inc
parentdc78f95dc2ed988bc1aded8472c8e12a59929799 (diff)
downloadbcm5719-llvm-6cdf844d75806bbac13bb5bb670198697e0a0d43.tar.gz
bcm5719-llvm-6cdf844d75806bbac13bb5bb670198697e0a0d43.zip
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. llvm-svn: 257384
Diffstat (limited to 'llvm/lib/Support/Windows/Signals.inc')
-rw-r--r--llvm/lib/Support/Windows/Signals.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index d109a66d703..f40ca72996a 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/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);
OpenPOWER on IntegriCloud