Closed smoelius closed 3 years ago
Sure, this seems reasonable. Do you want to make a PR with the function you describe? We can probably just add this function directly to src/lib.rs
.
Maybe we should return an &str
instead of a u32
. Currently all of the supported LLVM versions are integers, but maybe it's possible that in the future we want to support a version like 15-rc1
or 11.1
that is different from 15
or 11
.
Is there a way to ask
llvm-ir
for the LLVM version it was configured for?I am imagining something like:
Clearly, this could be handled in the caller (since it chose the feature). But I am wondering if there is a way to handle this without having to do extra work in the caller.