10 Commits

Author SHA1 Message Date
Nico Weber
63033d33c8 s/LLVM_ON_WIN32/_WIN32/, llvm
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331127 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-29 00:45:03 +00:00
Chandler Carruth
3c0d60785c Re-sort #include lines for unittests. This uses a slightly modified
clang-format (https://reviews.llvm.org/D33932) to keep primary headers
at the top and handle new utility headers like 'gmock' consistently with
other utility headers.

No other change was made. I did no manual edits, all of this is
clang-format.

This should allow other changes to have more clear and focused diffs,
and is especially motivated by moving some headers into more focused
libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 11:06:56 +00:00
Vitaly Buka
b3b1987549 allow_user_segv_handler was already removed
New default behavior matches previous allow_user_segv_handler=1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304032 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 20:50:49 +00:00
Vitaly Buka
fee7735cee Revert "Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests""
This dependents on r303729 which was reverted.

This reverts commit r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303796 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:11:12 +00:00
Vitaly Buka
f0fdd6463d Prevent UBSan report in CrashRecovery tests
Reverted by mistake with r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303785 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 18:11:57 +00:00
Vitaly Buka
bd571bcd53 Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests"
It's not needed after r303729.

This reverts commit r303311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303783 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:58:09 +00:00
Reid Kleckner
9292b008db Attempt to pacify ASan and UBSan reports in CrashRecovery tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 22:23:20 +00:00
Reid Kleckner
aabc86087d Re-land r303274: "[CrashRecovery] Use SEH __try instead of VEH when available"
We have to check gCrashRecoveryEnabled before using __try.

In other words, SEH works too well and we ended up recovering from
crashes in implicit module builds that we weren't supposed to. Only
libclang is supposed to enable CrashRecoveryContext to allow implicit
module builds to crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303279 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 18:16:17 +00:00
Reid Kleckner
0f42e5be40 Revert "[CrashRecovery] Use SEH __try instead of VEH when available"
This reverts commit r303274, it appears to break some clang tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303275 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 17:15:00 +00:00
Reid Kleckner
8d2c1f540e [CrashRecovery] Use SEH __try instead of VEH when available
Summary:
It avoids problems when other libraries raise exceptions. In particular,
OutputDebugString raises an exception that the debugger is supposed to
catch and suppress. VEH kicks in first right now, and that is entirely
incorrect.

Unfortunately, GCC does not support SEH, so I've kept the old buggy VEH
codepath around. We could fix it with SetUnhandledExceptionFilter, but
that is not per-thread, so a well-behaved library shouldn't set it.

Reviewers: zturner

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D33261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303274 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 17:02:16 +00:00