TomBebbington / llvm-rs

LLVM wrappers for Rust
BSD 3-Clause "New" or "Revised" License
68 stars 27 forks source link

How do I insert intrinsics with this library? #21

Closed RReverser closed 8 years ago

RReverser commented 8 years ago

Should those be inserted with special API which is not exposed (and thus require insertion with unsafe { ... } & llvm-sys) or is there a way to insert them using existing Builder APIs?

RReverser commented 8 years ago

Found a way - you just need to perform module.add_function with desired intrinsic name and parameter/return types, and then use as any other.