[LLVMdev] llvm::Type as llvm::Value in metadata

Marcus Frenkel marcus.frenkel at FernUni-Hagen.de
Tue Mar 27 01:46:48 PDT 2012


>> And to ask a concrete question: is there any way to store a reference to a llvm::Type within the LLVM metadata?
>
> Not directly, but you can store a null value (Constant::getNullValue())
> of the respective type.
>
> Cheers,
> Clemens

Hi Clemens,

I thought about this already, yes. It would still require me to know that a specific information in the metadata refers to a type (which originally I wanted to avoid), but I guess it can't be helped and I have to implement it that way.


So long,

Marcus



More information about the llvm-dev mailing list