TheDan64 / inkwell

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

module: make write_bitcode_to_path accept more general path representations #528

Closed airwoodix closed 3 months ago

airwoodix commented 3 months ago

Description

Change the function Module::write_bitcode_to_path to accept a AsRef<Path> argument instead of &Path. This allows passing e.g. string slices instead of explicitly building the Path instance, and matches functions in std::fs.

Since &Path is AsRef<Path>, the change is backwards compatible.

How This Has Been Tested

Checklist