TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.32k stars 224 forks source link

`Context::metadata_string` doc example returns an error #484

Open DaniPopes opened 6 months ago

DaniPopes commented 6 months ago

Describe the Bug Context::metadata_string doc example returns "metadata is expected to be a node.", due to calling InstructionValue::set_metadata

To Reproduce https://github.com/TheDan64/inkwell/blob/69c5a3fcc3e8b997c36e20021c52adcff664d746/src/context.rs#L1970-L2001

Expected Behavior A working example

LLVM Version (please complete the following information):

Desktop (please complete the following information):

Additional Context Opened an issue since I don't know how to fix it myself (: