[clang] Remove xbegin and _xend (PR #126952)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 12 10:20:51 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Devon Loehr (DKLoehr)

<details>
<summary>Changes</summary>

`intrin.h` contains declarations for both `xbegin` and `_xend`, but they should already be included transitively from `rtmintrin.h` via `immintrin.h` and/or `x86intrin.h`. Having them in both places causes problems if both headers are included.

Furthermore, the `intrin.h` declaration of `xbegin` seems to be bugged anyway, since it's missing its leading underscore.

Fixes #<!-- -->95133

---
Full diff: https://github.com/llvm/llvm-project/pull/126952.diff


1 Files Affected:

- (modified) clang/lib/Headers/intrin.h (-2) 


``````````diff
diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h
index 376046aeeaf5e..3dd1eb45817d4 100644
--- a/clang/lib/Headers/intrin.h
+++ b/clang/lib/Headers/intrin.h
@@ -162,8 +162,6 @@ void _Store_HLERelease(long volatile *, long);
 void _Store64_HLERelease(__int64 volatile *, __int64);
 void _StorePointer_HLERelease(void *volatile *, void *);
 void _WriteBarrier(void);
-unsigned __int32 xbegin(void);
-void _xend(void);
 
 /* These additional intrinsics are turned on in x64/amd64/x86_64 mode. */
 #if defined(__x86_64__) && !defined(__arm64ec__)

``````````

</details>


https://github.com/llvm/llvm-project/pull/126952


More information about the cfe-commits mailing list