Custom attribute annotations

In C/C++, we can have attribute annotation like below:

__attribute__((annotate("fff"))) void foo() {}

The annotation will be stored into in the IR. I'm currently doing analysis on LLVM IR, relying on the annotations to have some extra information.

Is there a way to do similar annotations in Rust and get it from the generated LLVM IR?

Any help is appreciated! Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.