Add FFI bindings for Module::getInstructionCount()
Just to make it useable for profiling and such inside rustc itself. It was vaguely useful in https://wiki.alopex.li/WhereRustcSpendsItsTime and I figured I might as well upstream it; I may or may not ever get around to doing more with it (hopefully I will), but it may be useful for others.
This commit is contained in:
parent
8c7b921feb
commit
567962d220
2 changed files with 9 additions and 0 deletions
|
|
@ -1729,6 +1729,7 @@ extern "C" {
|
|||
) -> LLVMRustResult;
|
||||
pub fn LLVMRustSetLLVMOptions(Argc: c_int, Argv: *const *const c_char);
|
||||
pub fn LLVMRustPrintPasses();
|
||||
pub fn LLVMRustGetInstructionCount(M: &Module) -> u32;
|
||||
pub fn LLVMRustSetNormalizedTarget(M: &Module, triple: *const c_char);
|
||||
pub fn LLVMRustAddAlwaysInlinePass(P: &PassManagerBuilder, AddLifetimes: bool);
|
||||
pub fn LLVMRustRunRestrictionPass(M: &Module, syms: *const *const c_char, len: size_t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue