[llvm] [Verifier] Allow too big unused sectioned global variables with local linkage (PR #212733)
Steffen Larsen via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 23:50:54 PDT 2026
steffenlarsen 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 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.
https://github.com/llvm/llvm-project/pull/212733
More information about the llvm-commits
mailing list