[all-commits] [llvm/llvm-project] 61a8da: [Clang][CodeGen] Add workaround for old glibc `__P...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Fri May 9 04:24:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61a8da9367dc7949f36916749f6038453ea4197f
https://github.com/llvm/llvm-project/commit/61a8da9367dc7949f36916749f6038453ea4197f
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2025-05-09 (Fri, 09 May 2025)
Changed paths:
M clang/lib/AST/Expr.cpp
A clang/test/CodeGen/glibc_ptr_align.c
Log Message:
-----------
[Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (#137851)
This patch adds a workaround for the old glibc `__PTR_ALIGN` macro:
```
((sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
(((pointer) - (sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
(align_mask)) &
~(align_mask)));
```
Closes https://github.com/llvm/llvm-project/issues/137833.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list