Alexandre B via llvm-dev
2021-Dec-30 12:46 UTC
[llvm-dev] Store Values of all types inside an i8 array at compile time
Hi there, I'd like some help on how to achieve the subject. An example of it would be storing a symbol (e.g. a function pointer) inside the array next to, let's say, integers. This would allow the linker to place the right address of the symbols, which we do not know at optimization-time, in the i8 array. How can I store any LLVM Value, whichever it's type is (as long as it's sized), inside an [<Sum of sizes> x i8] array ? This, storing Values of any type inside an [N x i8] array, would take place in a LLVM pass. I am aware that it will require to change every use of these values by a pointer cast and a load; this isn't an issue. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211230/220a75e2/attachment.html>