diff options
| author | Davide Italiano <davide@freebsd.org> | 2015-12-01 02:35:04 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2015-12-01 02:35:04 +0000 |
| commit | b37d6bd7aed272bfa1a44dac920392cea0d31fda (patch) | |
| tree | 42bdf1b85f09609de098836ff53b8f9269e591ca /llvm/lib | |
| parent | 456fdfcdc21824649c59cd8cf12e121b51bc490b (diff) | |
| download | bcm5719-llvm-b37d6bd7aed272bfa1a44dac920392cea0d31fda.tar.gz bcm5719-llvm-b37d6bd7aed272bfa1a44dac920392cea0d31fda.zip | |
[Windows] Simplify assertion code. NFC.
llvm-svn: 254363
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/Windows/DynamicLibrary.inc | 6 | ||||
| -rw-r--r-- | llvm/lib/Support/Windows/Signals.inc | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Support/Windows/DynamicLibrary.inc b/llvm/lib/Support/Windows/DynamicLibrary.inc index 17418b015c7..77146d47cf2 100644 --- a/llvm/lib/Support/Windows/DynamicLibrary.inc +++ b/llvm/lib/Support/Windows/DynamicLibrary.inc @@ -61,10 +61,8 @@ DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename, OpenedHandles = new DenseSet<HMODULE>(); if (!fEnumerateLoadedModules) { - if (!loadDebugHelp()) { - assert(false && "These APIs should always be available"); - return DynamicLibrary(); - } + assert(loadDebugHelp() && "These APIs should always be available"); + return DynamicLibrary(); } fEnumerateLoadedModules(GetCurrentProcess(), ELM_Callback, 0); diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc index f40ca72996a..d109a66d703 100644 --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -405,10 +405,7 @@ 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. - if (!load64BitDebugHelp()) { - assert(false && "These APIs should always be available"); - return; - } + assert(load64BitDebugHelp() && "These APIs should always be available"); if (RegisteredUnhandledExceptionFilter) { EnterCriticalSection(&CriticalSection); |

