[compiler-rt] [profile] fix profile generate for mingw x86_64

Differential Revision: https://reviews.llvm.org/D84757
This commit is contained in:
Peiyuan Song 2020-07-30 23:37:17 +03:00 committed by Martin Storsjö
parent da324f9904
commit 14c1b40174
2 changed files with 6 additions and 6 deletions

View File

@ -1,11 +1,11 @@
CHECK_CXX_SOURCE_COMPILES("
#ifdef _MSC_VER
#include <Intrin.h> /* Workaround for PR19898. */
#ifdef _WIN32
#include <intrin.h> /* Workaround for PR19898. */
#include <windows.h>
#endif
int main() {
#ifdef _MSC_VER
#ifdef _WIN32
volatile LONG val = 1;
MemoryBarrier();
InterlockedCompareExchange(&val, 0, 1);

View File

@ -53,9 +53,9 @@
#endif
#if COMPILER_RT_HAS_ATOMICS == 1
#ifdef _MSC_VER
#ifdef _WIN32
#include <windows.h>
#if _MSC_VER < 1900
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
#if defined(_WIN64)
@ -73,7 +73,7 @@
(DomType *)InterlockedExchangeAdd((LONG volatile *)&PtrVar, \
(LONG)sizeof(DomType) * PtrIncr)
#endif
#else /* !defined(_MSC_VER) */
#else /* !defined(_WIN32) */
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
__sync_bool_compare_and_swap(Ptr, OldV, NewV)
#define COMPILER_RT_PTR_FETCH_ADD(DomType, PtrVar, PtrIncr) \