Adding Metadata to LLVM IR?


I have a custom MIR analysis and I need to propagate its results to some of the LLVM IR instructions. Is there a way to store custom metadata in the LLVM IR? I'm currently investigating the rust_codegen_ssa::mir crate but I'm not absolutely sure to find it there.

I appreciate every response :slight_smile:

You need the rustc_codegen_llvm crate. That is the crate directly interacting with LLVM.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.