[llvm-dev] Unit testing generated IR

Jordan Rudd via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 24 19:03:45 PDT 2016


Hi,

I've been using llvm as part of a self-education project and I'm trying to
write a simple compiler. I'm curious about the best way to go about
validating the IR my compiler produces. On one hand, I can always produce a
bc file and run the interpreter on it from the command line, but I'm
wondering if there's a way I can do this programmatically in unit tests.
For example, is there any way to run the code in a module I've produced
through an interpreter and see the results from a unit test (without
running CreateProcess on lli)? Thanks for your time,

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160624/d9da4bec/attachment.html>


More information about the llvm-dev mailing list