[llvm] [Verifier] Allow too big unused sectioned global variables with local linkage (PR #212733)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 13:57:35 PDT 2026
adrian-prantl wrote:
> The current implementation of the Clang AST embedding has a special path for WASM that embeds the data as a metadata node, which is in turn later lowered to a section:
>
> https://github.com/llvm/llvm-project/blob/4616e9bbb9774bd0662ac095359a5d362f449819/clang/lib/CodeGen/ObjectFilePCHContainerWriter.cpp#L285-L299
>
>
> We could do something similar for the other paths, adding a new metadata node. I've prototyped something like this in [steffenlarsen at a33c5e7](https://github.com/steffenlarsen/llvm-project/commit/a33c5e71cd329d68d4b108faf85e684093d36c95), adding a `llvm.raw.sections` which the AsmPrinter lowers to a named data section if the target supports it. We might also be able to use this path for WASM.
That approach looks fine to me!
https://github.com/llvm/llvm-project/pull/212733
More information about the llvm-commits
mailing list