How do I find the function pointers for tests from the LLVM IR code of a Rust program?

Hello,

In order to get as much feedback as possible from both LLVM and Rust communities I am cross-posting my question here:

http://stackoverflow.com/questions/42177712/how-do-i-find-the-function-pointers-for-tests-from-the-llvm-ir-code-of-a-rust-pr

We are under impression that there might be some way of finding test functions reliably other than parsing complex structure layout produced by cargo/rustc.

Any feedback is appreciated.

Thanks,

Stanislav