[llvm] r193377 - lto.h: Use lto_bool_t instead of int to restore the ABI

Reid Kleckner rnk at google.com
Fri Oct 25 11:04:13 PDT 2013


Thanks!  I think I added the comment before committing and after testing
with MSVC and a .c file.  :)


On Fri, Oct 25, 2013 at 6:03 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> Fixed in r193404. Thanks!
>
> On 25 October 2013 04:43, Alp Toker <alp at nuanti.com> wrote:
> > This commit introduced C++ comments into a C header:
> >
> > ./include/llvm-c/lto.h:27:1: error: expected identifier or '(' before '/'
> > token
> >
> >  // MSVC in particular does not have anything like _Bool or bool in C,
> but
> > we can
> >
> > Alp.
> >
> >
> > On 24/10/2013 23:26, Reid Kleckner wrote:
> >
> > +#ifndef __cplusplus
> > +#if !defined(_MSC_VER)
> > +#include <stdbool.h>
> > +typedef bool lto_bool_t;
> > +#else
> > +// MSVC in particular does not have anything like _Bool or bool in C,
> but
> > we can
> > +// at least make sure the type is the same size.  The implementation
> side
> > will
> > +// use C++ bool.
> > +typedef unsigned char lto_bool_t;
> > +#endif
> > +#else
> > +typedef bool lto_bool_t;
> > +#endif
> > +
> >
> >
> > --
> > http://www.nuanti.com
> > the browser experts
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131025/6f239a69/attachment.html>


More information about the llvm-commits mailing list