Skip to content

Commit 4cce9fb

Browse files
[Arm64EC] Fix compilation of arm_acle.h (#91281)
1 parent f9d7619 commit 4cce9fb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/lib/Headers/arm_acle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ __swp(uint32_t __x, volatile uint32_t *__p) {
109109
#endif
110110

111111
/* 7.7 NOP */
112-
#if !defined(_MSC_VER) || !defined(__aarch64__)
112+
#if !defined(_MSC_VER) || (!defined(__aarch64__) && !defined(__arm64ec__))
113113
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __nop(void) {
114114
__builtin_arm_nop();
115115
}

clang/test/Headers/arm-acle-header.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// RUN: %clang_cc1 -x c++ -triple thumbv7-windows -target-cpu cortex-a15 -fsyntax-only -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 %s
88
// RUN: %clang_cc1 -x c++ -triple aarch64-windows -target-cpu cortex-a53 -fsyntax-only -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 %s
99
// RUN: %clang_cc1 -x c++ -triple arm64-apple-ios -target-cpu apple-a7 -fsyntax-only -ffreestanding -fms-extensions %s
10+
// RUN: %clang_cc1 -x c++ -triple arm64ec-windows -target-cpu cortex-a53 -fsyntax-only -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 %s
1011
// expected-no-diagnostics
1112

1213
#include <arm_acle.h>

0 commit comments

Comments
 (0)