[LLVMdev] RFC: llvm-shlib-test (Was: [llvm] r191029 - llvm-c: Make LLVMGetFirstTarget a proper prototype)
anders at 0x63.nu
Mon Sep 23 13:00:25 PDT 2013
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9333 bytes
Desc: not available
More information about the llvm-dev