[llvm-dev] Cast between struct

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Wed May 6 19:14:12 PDT 2020


> -----Original Message-----
>
> Thanks for the help. I’m thinking the same way. Now I’m stuck with how to
> create a struct; I know how to create a llvm::StructType but I’m not clear of
> how to create a Value whose type is struct). It seems that llvm disallowed
> directly create a Value object; all Values are created from one of its
> numerous descendants. Can you give me some guidance here?

The "trick" is to start with "undef" (which always exists for any type).

-Krzysztof



More information about the llvm-dev mailing list