[compiler-rt] Test fixups for MSVC. (PR #109887)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 22:05:14 PDT 2024
================
@@ -2,12 +2,16 @@
//
// RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
// RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// REQUIRES: x86-target-arch
+// REQUIRES: x86-target-arch && (!MSVC || asan-32-bits)
#ifdef _WIN32
#include <windows.h>
#endif
+#if _MSC_VER && !defined(__clang__)
+#define __builtin_trap() __asm ud2;
+#endif
----------------
compnerd wrote:
This isn't safe - the `__asm` is limited to x86 and not available at x86_64.
https://github.com/llvm/llvm-project/pull/109887
More information about the llvm-commits
mailing list