LLVM/project 6062226llvm/test/tools/llubi byval.ll byval_padding.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Add support for byval pointer arguments (#201852)

This patch adds support for the byval attribute. The hidden copy is
implemented as memcpy with the allocation size of the specified type.
See https://github.com/llvm/llvm-project/pull/205576 for more
information.
DeltaFile
+56-1llvm/tools/llubi/lib/Interpreter.cpp
+56-0llvm/test/tools/llubi/byval.ll
+49-0llvm/test/tools/llubi/byval_padding.ll
+25-0llvm/test/tools/llubi/byval_lifetime.ll
+18-0llvm/test/tools/llubi/byval_oversize.ll
+18-0llvm/test/tools/llubi/byval_mismatch3.ll
+222-18 files not shown
+347-114 files

LLVM/project cf6d792clang/include/clang/Basic BuiltinsAMDGPU.td, clang/test/CodeGen amdgpu-builtin-processor-is.c amdgpu-builtin-is-invocable.c

[AMDGPU][GFX1250] Support asyncmark builtin (#205697)
DeltaFile
+4-3clang/test/CodeGenOpenCL/builtins-amdgcn-asyncmark-errs.cl
+3-3clang/include/clang/Basic/BuiltinsAMDGPU.td
+2-2clang/test/CodeGenCXX/dynamic-cast-address-space.cpp
+1-1clang/test/CodeGen/amdgpu-builtin-processor-is.c
+1-1clang/test/CodeGen/amdgpu-builtin-is-invocable.c
+1-0clang/test/CodeGenOpenCL/builtins-amdgcn-asyncmark.cl
+12-101 files not shown
+13-107 files

LLVM/project 3ddeaebcompiler-rt/lib/instrumentor-tools instrumentor_runtime.h README.md, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp CMakeLists.txt

Revert "[Instrumentor] Add runtime examples: [1/N] A flop counter" (#205960)

This reverts commit 61cbfabb7ade682a64f516c871b2bacb1e3e324a.

Fails compiler-rt standalone builds, though, locally it works fine :(
DeltaFile
+0-293compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+0-164compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+0-82compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+0-77compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+0-75compiler-rt/test/instrumentor-tools/lit.cfg.py
+0-49compiler-rt/lib/instrumentor-tools/README.md
+0-74020 files not shown
+1-96626 files

LLVM/project bd53dfeflang/test/Semantics/CUDA cuf14.cuf cuf15.cuf

[flang][cuda][NFC] Fix some typos and misplaced comment (#205933)
DeltaFile
+2-2flang/test/Semantics/CUDA/cuf14.cuf
+2-2flang/test/Semantics/CUDA/cuf15.cuf
+1-1flang/test/Semantics/CUDA/cuf-proc-attr-error.cuf
+1-1flang/test/Semantics/CUDA/cuf09.cuf
+6-64 files

LLVM/project f0f5f77llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy BUILD.gn

[gn build] Port fcc105f40c8e (#205959)
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
+1-01 files

LLVM/project df15df9llvm/utils/gn/secondary/llvm/unittests/IR BUILD.gn

[gn build] Port 2ce6fc677fdb (#205958)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/IR/BUILD.gn
+1-01 files

LLVM/project a4404f2llvm/utils/gn/secondary/libcxx/include BUILD.gn, llvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn] port 8a531c3608c7 (#205957)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-0llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+2-02 files

LLVM/project 36b2048llvm/lib/Target/X86 X86FrameLowering.cpp, llvm/test/CodeGen/X86/apx push2-pop2.ll push2-pop2-cfi-seh.ll

[X86][APX] Implement push+push2+push pre-alignment strategy for PP2 (#205031)

Replace the dummy "push %rax" stack-alignment padding for APX push2/pop2
(PP2) with a push+push2+push strategy: when an even number of callee-saved
GPRs is involved, a single CSR push provides the 16-byte alignment instead
of a throwaway push %rax, and the remaining registers use push2/pop2. The
padForPush2Pop2 flag and its associated dummy push, SUB/LEA padding, and
SEH_StackAlloc emission in spill/restoreCalleeSavedRegisters are removed.

BuildStackAdjustment now uses NF (no-flags) variants of ADD/SUB, but
only as a smaller replacement for LEA, i.e. only when EFLAGS must be preserved
across the adjustment. When EFLAGS is dead the plain SUB/ADD is kept, which is
  shorter than the EVEX-encoded NF form. The NF opcodes are 64-bit
(SUB64ri32_NF/ADD64ri32_NF), so they are not used for the x32 ABI, and
they are recognized in mergeSPUpdates and the epilogue backward scan.

  Update LIT tests accordingly.

  Assisted-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
DeltaFile
+142-89llvm/test/CodeGen/X86/apx/push2-pop2.ll
+60-62llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll
+40-40llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh-v3.ll
+65-0llvm/test/CodeGen/X86/apx/nf-stackadjust.ll
+32-27llvm/lib/Target/X86/X86FrameLowering.cpp
+18-18llvm/test/CodeGen/X86/apx/pp2-with-stack-clash-protection.ll
+357-2363 files not shown
+376-2639 files

LLVM/project c3652ballvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/AArch64 icmp-vector-reduce.ll fold-reduce-add-cmp-zero.ll

[VectorCombine] Fold zero tests of or/umax reductions (#205622)

Recognize equality and inequality tests against zero on vector.reduce.or
and vector.reduce.umax. When profitable, replace the scalar reduction
and
compare with a lane-wise comparison followed by an i1 reduce.or or
reduce.and.

Run the existing zero-preserving reduction fold first to retain its more
specific canonicalization opportunities.

Proof: https://alive2.llvm.org/ce/z/pyoTwP
Fixed https://github.com/llvm/llvm-project/issues/205028
DeltaFile
+106-0llvm/test/Transforms/VectorCombine/X86/fold-reduction-zero-test.ll
+46-46llvm/test/Transforms/VectorCombine/RISCV/icmp-vector-reduce.ll
+82-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+40-40llvm/test/Transforms/VectorCombine/AArch64/icmp-vector-reduce.ll
+30-30llvm/test/Transforms/VectorCombine/X86/icmp-vector-reduce.ll
+20-20llvm/test/Transforms/VectorCombine/AArch64/fold-reduce-add-cmp-zero.ll
+324-1367 files not shown
+401-21613 files

LLVM/project cc91bbccompiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp CMakeLists.txt

[Instrumentor] Add runtime examples: [1/N] A flop counter (#205698)

This adds a instrumentor-tools folder into compiler RT to showcase use
cases of the instrumentor. The initial example is a program that, via
instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

This is the second try with more CMake magic after
https://github.com/llvm/llvm-project/pull/205221 failed on some
platforms.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+293-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+164-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+82-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+49-0compiler-rt/test/instrumentor-tools/simple_flops.c
+740-020 files not shown
+966-126 files

LLVM/project a237019clang/unittests/Index CMakeLists.txt

[clang][index][USR] Fix build issue introduced in #205430 (#205954)

Add clangUnifiedSymbolResolution as dependency of clang index unit test.
DeltaFile
+1-0clang/unittests/Index/CMakeLists.txt
+1-01 files

LLVM/project e2ac42blldb/include/lldb/Utility FileSpec.h, lldb/source/Utility FileSpec.cpp

[lldb] Remove ConstString from FileSpec setters (#205944)
DeltaFile
+0-10lldb/source/Utility/FileSpec.cpp
+0-2lldb/include/lldb/Utility/FileSpec.h
+0-122 files

LLVM/project a9b50ffflang/lib/Lower OpenACC.cpp, flang/test/Lower/OpenACC acc-routine-bind-devtype-filter.f90 acc-routine-bind-clone-signature.f90

[flang][openacc] add acc.routine op for external names added in bind clauses. (#205591)

This adds acc.routine ops for the func.func ops that declare external
functions bound for device specific. This is needed to get the
ACCRoutineToGPUFunc pass to move the function declaration into the
correct region.

This is a follow-up from
[#203088](https://github.com/llvm/llvm-project/pull/203088) which
unblocked the original pass that was stalling bind clauses, but failed
further down the pipeline.
DeltaFile
+135-10flang/lib/Lower/OpenACC.cpp
+53-0flang/test/Lower/OpenACC/acc-routine-bind-devtype-filter.f90
+3-1flang/test/Lower/OpenACC/acc-routine-bind-clone-signature.f90
+2-1flang/test/Lower/OpenACC/acc-routine-bind-devtype-undeclared.f90
+2-1flang/test/Lower/OpenACC/acc-routine-bind-string-undeclared.f90
+2-1flang/test/Lower/OpenACC/acc-routine-bind-undeclared.f90
+197-146 files

LLVM/project d3ce9f0clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp, clang/test/CIR/Transforms/abi-lowering direct-flatten.cir coerce-record-to-record-via-memory.cir

[CIR] Implement Direct+canFlatten in CallConvLowering

ArgKind::Direct with a multi-field coerced struct and the canFlatten flag
means the coerced struct is passed as one scalar wire argument per field.
CallConvLowering was passing it as a single aggregate, ignoring canFlatten.

A new getFlattenedCoercedType helper recognizes the Direct+canFlatten arg
shape.  At the callee, insertArgCoercion replaces the single block argument
with N scalar block args, stores each into an alloca of the coerced struct
type, reloads it, and coerces back to the original argument type when the
coerced struct type differs from the original.  The Ignore-drop loop and
updateArgAttrs account for the N block-argument slots a flattened arg
occupies; updateArgAttrs also shapes them on the sret return path.

At the call site, when the operand type differs from the coerced struct
type the operand is coerced through a memory slot and each field is read
from that slot with cir.get_member + cir.load (via a new emitCoercionToMemory
helper that returns the coerce-slot pointer without loading the whole
aggregate); when the types already match each field is extracted directly

    [7 lines not shown]
DeltaFile
+259-0clang/test/CIR/Transforms/abi-lowering/direct-flatten.cir
+183-36clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+1-1clang/test/CIR/Transforms/abi-lowering/coerce-record-to-record-via-memory.cir
+443-373 files

LLVM/project 6a2bc78clang/unittests/Index CMakeLists.txt

[clang][index][USR] Fix build issue introduced in #205430

Add clangUnifiedSymbolResolution as dependency of clang index unit
test.
DeltaFile
+1-0clang/unittests/Index/CMakeLists.txt
+1-01 files

LLVM/project 6839533libcxx/include version, libcxx/include/__expected expected.h

Revert "[libc++]  P3798R1: The unexpected in std::expected (#204826)" (#205597)

Reverts 45a65bb48b5925707f43d08e30df2263a5e4e268.

Currently, there is no consensus among LWG and standard library
maintainers that P3798R1 should be applied as a Defect Report. So it is
better to revert the paper application for now and then reapply it as an
addition in C++29 when C++29 mode is ready.
DeltaFile
+0-42libcxx/test/std/utilities/expected/expected.void/observers/has_error.pass.cpp
+0-42libcxx/test/std/utilities/expected/expected.expected/observers/has_error.pass.cpp
+4-4libcxx/test/std/language.support/support.limits/support.limits.general/expected.version.compile.pass.cpp
+4-4libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+0-4libcxx/include/__expected/expected.h
+2-2libcxx/include/version
+10-985 files not shown
+13-10411 files

LLVM/project 5493585llvm/lib/Transforms/Scalar GVNSink.cpp

[llvm][GVNSink] Avoid non-determistic iteration order over NeededPHIs

The iteration order of DenseSet is not guaranteed, which affects the
output of code generated with GVNSink enabled. This can cause code to be
emitted in differing order, affect section ordering and in some cases
was reported to sometimes result in larger binaries due to increased
padding between sections.

This patch addresses this by using SetVector, which has a deterministic
iteration order.
DeltaFile
+3-4llvm/lib/Transforms/Scalar/GVNSink.cpp
+3-41 files

LLVM/project cd50ce0clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp, clang/test/CIR/Transforms/abi-lowering direct-flatten.cir coerce-record-to-record-via-memory.cir

[CIR] Implement Direct+canFlatten in CallConvLowering

ArgKind::Direct with a multi-field coerced struct and the canFlatten flag
means the coerced struct is passed as one scalar wire argument per field.
CallConvLowering was passing it as a single aggregate, ignoring canFlatten.

A new getFlattenedCoercedType helper recognizes the Direct+canFlatten arg
shape.  At the callee, insertArgCoercion replaces the single block argument
with N scalar block args, stores each into an alloca of the coerced struct
type, reloads it, and coerces back to the original argument type when the
coerced struct type differs from the original.  The Ignore-drop loop and
updateArgAttrs account for the N block-argument slots a flattened arg
occupies; updateArgAttrs also shapes them on the sret return path.

At the call site, when the operand type differs from the coerced struct
type the operand is coerced through a memory slot and each field is read
from that slot with cir.get_member + cir.load (via a new emitCoercionToMemory
helper that returns the coerce-slot pointer without loading the whole
aggregate); when the types already match each field is extracted directly

    [5 lines not shown]
DeltaFile
+183-36clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+211-0clang/test/CIR/Transforms/abi-lowering/direct-flatten.cir
+1-1clang/test/CIR/Transforms/abi-lowering/coerce-record-to-record-via-memory.cir
+395-373 files

LLVM/project f5d5ff9flang/docs OpenACC-extensions.md, flang/include/flang/Semantics semantics.h

[flang][semantics][OpenACC] Warn for DEFAULT(NONE) scalars by default (#205683)

Change OpenACC `DEFAULT(NONE)` scalar handling to use the
pre-OpenACC-3.2 scalar behavior by default while emitting a warning.
Scalars referenced in a `default(none)` compute region without an
explicit data clause now warn by default instead of erroring. Arrays and
other non-scalars still error under `default(none)`.

Users can opt into OpenACC 3.2 strict scalar behavior with:
`-fopenacc-default-none-scalars-strict` and the default scalar warning
can be suppressed with: `-Wno-openacc-default-none-scalars-strict`
DeltaFile
+13-17flang/docs/OpenACC-extensions.md
+28-0flang/unittests/Frontend/CompilerInstanceTest.cpp
+15-12flang/test/Semantics/OpenACC/acc-default-none-scalars-strict.f90
+12-12flang/test/Semantics/OpenACC/acc-default-none-scalars.f90
+9-0flang/include/flang/Semantics/semantics.h
+7-2flang/lib/Frontend/CompilerInvocation.cpp
+84-437 files not shown
+97-5013 files

LLVM/project c580406clang/lib/CIR/CodeGen CIRGenFunction.cpp CIRGenModule.cpp, clang/test/CIR/CodeGen goto-address-label-table.c label-values.c

[CIR] Wire const goto labels into indirect branch (#201644)

A computed goto through a constant dispatch table -- the GNU static
dispatch-table idiom `static const void *tbl[] = {&&L1, &&L2}; goto *tbl[i];`
-- reached `errorNYI("Indirect goto without a goto block")` in
`emitIndirectGotoStmt`. #203644 emits the label-address constant (the
value-like `#cir.block_addr_info`) into the table, but it takes a label's
address in a constant context without registering the label as address-taken,
so no indirect-goto block exists for the following `goto *tbl[i]` to branch to.
(#203644 landed the constant attribute, its lowering, and the GotoSolver label
retention; this is the remaining dispatch wiring.)

`VisitAddrLabelExpr` in the constant emitter now records each label via
`takeAddressOfConstantLabel`, which instantiates the indirect-goto block and
tracks the label; `finishIndirectBranch` then adds those labels as
`cir.indirect_br` successors alongside the existing op-form labels. A label
named more than once in a table is kept as a distinct successor each time, to
match classic codegen.


    [8 lines not shown]
DeltaFile
+104-0clang/test/CIR/CodeGen/goto-address-label-table.c
+23-29clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+9-38clang/test/CIR/CodeGen/label-values.c
+0-23clang/lib/CIR/CodeGen/CIRGenModule.cpp
+12-4clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+9-4clang/lib/CIR/CodeGen/CIRGenFunction.h
+157-983 files not shown
+162-1269 files

LLVM/project 7cb370dlldb/include/lldb/Breakpoint BreakpointName.h, lldb/source/Target Target.cpp

[lldb] Replace ConstString with std::string in BreakpointName (#205910)
DeltaFile
+9-10lldb/include/lldb/Breakpoint/BreakpointName.h
+3-2lldb/source/Target/Target.cpp
+12-122 files

LLVM/project 0c4cc9fclang/include/clang/Basic CodeGenOptions.def, clang/include/clang/Options Options.td

Revert "[Clang] Optionally use NewPM to run CodeGen Pipeline" (#205943)

Reverts llvm/llvm-project#205928

Is missing dependencies in a shared libraries build. Will investigate
offline.
DeltaFile
+17-77clang/lib/CodeGen/BackendUtil.cpp
+0-9clang/test/CodeGen/X86/newpm.c
+0-8clang/include/clang/Options/Options.td
+0-1clang/include/clang/Basic/CodeGenOptions.def
+17-954 files

LLVM/project eea0690llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 copyable-reduced-erased.ll

[SLP]Fix crash erasing reduced value extract still used by reduction

A reduced value vectorized in an operand subtree is replaced by an
extractelement that can be excluded from another reduction group's
candidates as incompatible, yet it is still consumed by the final
reduction. Keep such excluded extracts externally used so they are not
erased while vectorizing that group.

Fixes #205886

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/205942
DeltaFile
+64-0llvm/test/Transforms/SLPVectorizer/X86/copyable-reduced-erased.ll
+17-5llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+81-52 files

LLVM/project 294f9beutils/bazel/llvm-project-overlay/clang/unittests BUILD.bazel

[Bazel] Fixes a18c09a (#205917)

This fixes a18c09a05d6d6a950b1b7cd9c59a43fcee5cb442.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+2-01 files

LLVM/project b0735fdclang/unittests/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowTest.cpp

[SSAF][PointerFlow] Upstream Reference-to-pointer binding tests

The majority of the content of rdar://179151476 duplicates the
PointerFlow analysis after
https://github.com/llvm/llvm-project/pull/203633.  Therefore, we only
need to upstream the tests for better test coverage and proving the
duplication.

rdar://179151476
DeltaFile
+134-0clang/unittests/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowTest.cpp
+134-01 files

LLVM/project 62b9b98llvm/include/llvm/IR IntrinsicsAMDGPU.td, llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp SIISelLowering.cpp

[AMDGPU] Guard more intrinsics with target features
DeltaFile
+1-51llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+0-42llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+0-24llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+15-2llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+4-4llvm/test/CodeGen/AMDGPU/unsupported-av-store.ll
+4-4llvm/test/CodeGen/AMDGPU/unsupported-av-load.ll
+24-12712 files not shown
+47-14318 files

LLVM/project 44ae8a8clang/lib/CodeGen CodeGenAction.cpp, llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[RFC][CodeGen] Add generic target feature checks for intrinsics

This PR adds target-independent infrastructure for annotating LLVM intrinsics
with required subtarget feature expressions.

It introduces a TargetFeatures string field to intrinsic TableGen records.
TableGen emits an intrinsic-to-feature mapping table.

Both SelectionDAG and GlobalISel now perform this check before lowering target
intrinsics. This allows targets to opt in by annotating intrinsic definitions
directly, rather than adding custom checks during lowering, legalization, or
instruction selection.

This PR uses one AMDGPU intrinsic as an example.
DeltaFile
+96-3llvm/lib/MC/MCSubtargetInfo.cpp
+38-0clang/lib/CodeGen/CodeGenAction.cpp
+33-1llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
+31-0llvm/lib/IR/DiagnosticInfo.cpp
+28-0llvm/test/TableGen/intrinsic-target-features.td
+25-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+251-414 files not shown
+361-920 files

LLVM/project 276c06fflang/lib/Semantics check-omp-structure.cpp check-omp-structure.h

[flang][OpenMP] Delete no longer needed CheckAllowedClause

This removes the older overload of CheckAllowedClause(clauseId).
After 0f1abfe0af that function was no longer doing anything.
DeltaFile
+17-158flang/lib/Semantics/check-omp-structure.cpp
+58-3flang/lib/Semantics/check-omp-structure.h
+0-8flang/lib/Semantics/check-omp-loop.cpp
+0-1flang/lib/Semantics/check-omp-variant.cpp
+75-1704 files

LLVM/project dc2b5bfflang/lib/Lower OpenACC.cpp, flang/lib/Semantics resolve-names.cpp

[flang][cuda][acc] Fix use_device device attribute for USE-renamed variables (#205902)

Example:
```fortran
module m
  complex(8), allocatable, pinned :: v(:,:)
  interface callee
    subroutine callee_x(x, n)
      complex(8), device :: x(:,:)
      integer :: n
    end subroutine
  end interface
end module

subroutine driver(n)
  use m, only : callee, v_renamed => v
  integer :: n
  !$acc data copy(v_renamed)
  !$acc host_data use_device(v_renamed)

    [11 lines not shown]
DeltaFile
+22-4flang/lib/Semantics/resolve-names.cpp
+16-0flang/test/Lower/OpenACC/acc-host-data-cuda-device.f90
+12-3flang/lib/Lower/OpenACC.cpp
+50-73 files

LLVM/project 6b42621lldb/source/Expression DWARFExpression.cpp, lldb/unittests/Expression DWARFExpressionTest.cpp

[lldb] Reject DW_OP_deref_size with size 0 (#205911)

`Evaluate_DW_OP_deref` validated that the dereference size was `<= 8`
but
not that it was non-zero.  The DWARF expression evaluator parses
untrusted operands, so a `DW_OP_deref_size` with size operand `0` is
reachable (it is hit by the lldb-dwarf-expression-fuzzer).

A zero dereference size flows into `DerefSizeExtractDataHelper`, which
constructs a `DataExtractor` with `addr_size == 0` and aborts on its
assertion. The unit test that feeds `DW_OP_lit0, DW_OP_deref_size, 0x00`
shows the crash:

```
[ RUN      ] DWARFExpressionMockProcessTest.DW_OP_deref_size_zero
Assertion failed: (addr_size >= 1 && addr_size <= 8), function
DataExtractor, file DataExtractor.cpp, line 134.
 #8  DataExtractor::DataExtractor(...)
 #11 DWARFExpression::Evaluate(...)

    [6 lines not shown]
DeltaFile
+16-0lldb/unittests/Expression/DWARFExpressionTest.cpp
+1-1lldb/source/Expression/DWARFExpression.cpp
+17-12 files