Bug#922731: llvm-toolchain-7: Unjustified API breakage introduced by Debian patch

Svante Signell svante.signell at gmail.com
Wed Feb 20 11:51:30 GMT 2019


On Wed, 2019-02-20 at 09:21 +0100, Sylvestre Ledru wrote:
> Le 20/02/2019 à 09:19, Dun Hum a écrit :
> > > Would you have a testcase which shows the issue? This to make sure we
> > > don't regress again
> > > in the future.
> > The simplest test case is the following one, it only checks that the enum
> > value exist and has the correct
> > name.
> > 
> > ```
> > #include <llvm/ADT/Triple.h>
> > 
> > int main()
> > {
> >      (void)llvm::Triple::KFreeBSD;
                             ^
                             kFreeBSD;
> >      return 0;
> > }
> > ```
> > 
> > Compile with `g++ $(llvm-config --cflags) test.cpp` and make sure `$?` is
> > zero.
> 
> Thanks but I was more thinking about ABI compatibility testing. :)

The problem with the code is indicated above. It is defined in the enum OSType{}
of Class Triple{}.

>From what I've learned upstream use the convention that all names should be
starting with uppercase (called Upper Camel Case, see 
http://wiki.c2.com/?CamelCase) In fact Using KFreeBSD is not strictly Upper
Camel Case, since no two upper case letters are allowed in the beginning of the
word) In my opinion this convention is extremely stupid, e.g. iOS is named as
IOS etc. Additionally, llvm-toolchain does not build since version -3.6 so there
is no problem for later versions of llvm-toolchain.

However, I could change back to using KFreeBSD since for acceptance by upstream
all occurrences of defined(__FreeBSD_kernel__) in the patches should read
defined(__FreeBSD_kernel__) && !defined(__FreeBSD__) to make the builds on other
FreeBSD systems unharmed.

I'll do that in due time. In the meanwhile, can you add the attached patch and
release llvm-toolchain-7_7.0.1-7?

Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: include_llvm_MC_MCELFObjectWriter.h.diff
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20190220/cb29077d/attachment.bin>


More information about the Pkg-llvm-team mailing list