[llvm] [Verifier] Make verifier fail when global variable size exceeds address space size (PR #179625)

Anthony Latsis via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 02:08:07 PDT 2026


AnthonyLatsis wrote:

@steffenlarsen Hello Steffen, we are hitting this assertion when building the embedded Swift stdlib:
```
Global variable is too large to fit into the address space
ptr @__clang_ast
 [136572 x i8]
```

Claude came back with
> Building the embedded Swift stdlib for avr-none-none-elf, swift-frontend aborts in the LLVM verify pass:
> Global variable is too large to fit into the address space
> ptr @__clang_ast   ; [136164 x i8]
> AVR's data address space (addr space 0) is 16-bit → max 65535 bytes; the __clang_ast blob is 136164 bytes.
> 
> The right fix likely belongs in llvm-project — relax the verifier for section-anchored, non-addressable globals like __clang_ast (they're metadata, never actually addressed on-target), or place the
>   blob in a non-data address space.

Does this sound reasonable to you?

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


More information about the llvm-commits mailing list