[LLVMdev] RFC: llvm-shlib-test (Was: [llvm] r191029 - llvm-c: Make LLVMGetFirstTarget a proper prototype)

Sean Silva
Mon, 23 Sep 2013 23:48:45 -0000

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.

-- Sean Silva


On Mon, Sep 23, 2013 at 4:00 PM, Anders Waldenborg <anders at 0x63.nu>
wrote:

> Moving this to llvmdev.
>
> On Fri, Sep 20, 2013 at 08:26:41AM +0200, Anders Waldenborg wrote:
> > > > This avoids warnings when included in a application that
> > > > uses -Wstrict-prototypes.
> > > >
> > >
> > > Should we enable this warning in CFLAGS for LLVM builds to catch
this
> > > sooner?
> >
> > It is a C-only warning, and AFAICS there is no C code in that uses
> > llvm-c in the llvm source tree where this warning could be added.
> >
> > That said I think it would be good if there was some test for the C
> > API that compiled and linked againts libLLVM-X.so to make sure that
> > works properly and there has not sneaked in some c++ in the header
> > files. Something like c-index-test in clang, but unfortunately I guess
> > llvm-c is to diverse to be put in a single tool like that.
>
> Hacked up the beginnings of small tool for this. Find it attached.
>
> Does it make sense? Is this something that should be finished up and
> included?
>
> I doubt it will ever be able to reach good coverage over the llvm-c
> api. But it should be a quick smoke test to verify that it works at
> all, and that no c++-ism has been introduced in the headers that are
> included from C. And of course add the "-Wstrict-prototypes"
warning.
>
>  anders
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20130923/035b0b63/attachment.html>