[LLVMdev] RFC: llvm-shlib-test (Was: [llvm] r191029 - llvm-c: Make LLVMGetFirstTarget a proper prototype)
anders at 0x63.nu
Tue Sep 24 04:11:01 PDT 2013
On Mon, Sep 23, 2013 at 07:48:45PM -0400, Sean Silva wrote:
> I like the idea, but I find the name confusing; I think it should have
> `llvm-c` or `c-api` somewhere in the name. This could also serve as a
> simple example of using the API.
I had it as llvm-c-test first, then noticed that the shared library's
directory was named "llvm-shlib".
Yes, making sure it serves as a good example of using the API is a
good idea. Not sure all tests would be that, but it is a good goal.
The tests I have in mind are:
basically just llvm-dis, tests memorybuffer/bitreader
already implemented in patch, uncertain about protability as it
does dup2 tricks to dump to stdout
tests basic iteration over stuff in module
implemented in patch, want to extend it to iterate over
Test llvm-c/Disassebler.h. Not sure about input format,
lines of cpu name + hexdumped asm maybe is easiest for FileCheck
Test llvm-c/Object.h. List sections and symbols of an object file.
LLVMGetFirstTarget/LLVMGetNextTarget and whatever can be extracted
Test Core.h irbuilding and possibly executionengine. Create a module
with a function evaluating the specified aritmetic expression.
Possibly generating machinecode and executing.
More information about the llvm-dev