[clang][DebugInfo] Emit DIProperty for synthesized Objective-C properties (#220362)
Follow-up to #215776, which added `DW_TAG_property` / `DIProperty`
support to LLVM's DebugInfo. This patch teaches Clang's CodeGen to emit
the new `DIProperty` node.
In addition to the legacy `DIObjCProperty` node, `CGDebugInfo` now also
emits a `DIProperty` node whose `backing_storage` points at the ivar a
synthesized property forwards to.
Covered in `clang/test/DebugInfo/ObjC/property-backing-storage.m`:
- `declaredBacking`: `@synthesize` binds to a custom ivar name that IS
declared in the `@interface`.
- `undeclaredBacking`: `@synthesize` binds to a custom ivar name that is
NOT declared; the compiler creates the ivar itself.
- `implicitBacking`: no `@synthesize` at all; the compiler
auto-synthesizes both the accessors and a default-named ivar.
[libunwind] Bound the DWARF expression evaluator operand stack (#220662)
`evaluateExpression` interprets DW_OP_* bytecode against a fixed-size
`pint_t stack[100]` operand stack without checking whether `sp` stays
within array bounds. Malformed or hostile DWARF expressions (such as
those injected via dynamic FDE registration) pushing more than 100
values or underflowing the stack could corrupt the native call stack.
Add bounds checking on `sp` within `evaluateExpression`:
- Bound `sp` to `[&stack[1], &stack[98]]` at each iteration in the
opcode loop, as single-step opcodes push at most 1 value and net-pop at
most 1.
- Add index/depth validation for `DW_OP_pick` and `DW_OP_rot`.
- Ensure `sp >= &stack[1]` on exit from the evaluator.
- Abort execution via `_LIBUNWIND_ABORT` when bounds are violated.
- Add a regression test verifying that an overflowing DWARF expression
aborts safely rather than overflowing the stack.
[CIR] Stop marking byval arguments noalias (#220673)
We were putting llvm.noalias on every byval argument. Classic adds it
only under -fpass-by-value-is-noalias, which defaults off, and that
option isn't plumbed into CIR at all, so the right thing is to not emit
it. llvm.noundef stays, since classic does emit that.
Most of the test churn is collapsing LLVM-CIR / LLVM-OGCG prefix pairs
that existed only to record the divergence.
Assisted-by: Cursor / claude-opus-5
Use `FUNC_CODE_INST_ATOMICRMW_OLD` legacy code for bitcode writer. (#219277)
Previously, for the AtomicRMW instruction, `FUNC_CODE_INST_ATOMICRMW`
(code 59) would be emitted by the bitcode writer.
This is invalid for DXIL, since `FUNC_CODE_INST_ATOMICRMW_OLD` (code 38)
is expected instead.
This PR changes the emitted code to the FUNC_CODE_INST_ATOMICRMW_OLD
code instead.
Fixes: https://github.com/llvm/llvm-project/issues/217196
Assisted by: Github Copilot
Add `InterlockedAnd` standalone builtin and resource methods. (#219317)
This PR adds the `InterlockedAnd` standalone builtin, and associated
resource methods.
It mimics the implementation of the `InterlockedOr` builtin and resource
methods.
Fixes: https://github.com/llvm/llvm-project/issues/99125
Assisted by: Github Copilot
Merge tag 'selinux-pr-20260903' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull SELinux fixes from Paul Moore:
"Two SELinux fixes: one to fix how we lookup a BPF token's creator
label to prevent a possible TOCTOU, and one to update Ondrej's email
address"
* tag 'selinux-pr-20260903' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
MAINTAINERS, mailmap: update email address for Ondrej Mosnáček
selinux: fix BPF token permission checks
[LLVM][NFC] Use +inf/-inf syntax for float infinity literals (#221019)
Replaces the legacy float 0x* encodings with the canonical `float +inf`
and `float -inf` syntax for positive/negative infinity literals.
This reduces the chances that the old syntax is introduced in new code,
whether by copying existing tests or by an LLM reproducing the
preexisting style.
The following folders were ignored:
```
llvm/test/Assembler
```
```sh
rg -l -0 '\bfloat 0x7FF0000000000000\b' llvm \
| xargs -0 perl -pi -e 's/\bfloat 0x7FF0000000000000\b/float +inf/g'
rg -l -0 '\bfloat 0x7ff0000000000000\b' llvm \
[15 lines not shown]
MAINTAINERS, mailmap: update email address for Ondrej Mosnáček
I'm going to use my personal email for kernel contributions from now on.
Update MAINTAINERS and .mailmap to reflect this.
Also switch to use proper spelling with diacritics, since I normally use
the full Unicode name with my personal email address. I'm leaving
in-code occurences unchanged though, as that would be just unnecessary
churn.
Link: https://lore.kernel.org/lkml/CAFqZXNvOGbzy8-ZnJtKi94jfu2H173Tz7VYpK8KuseMQS-9tNA@mail.gmail.com/
Signed-off-by: Ondrej Mosnáček <omosnacek at gmail.com>
Signed-off-by: Paul Moore <paul at paul-moore.com>