[cfe-dev] name compatibility with llvm-gcc?

Eli Friedman eli.friedman at gmail.com
Tue Jul 8 16:03:36 PDT 2008


On Tue, Jul 8, 2008 at 2:43 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
> Hi,
>
> I noticed that struct and union LLVM type names generated by clang and
> llvm-gcc don't follow the same naming convention, which is causing me some
> headaches.
> llvm-gcc uses the following convention: struct.struct_name;
> struct.union_name
> while clang uses: struct._struct_name; union._union_name.

Okay... I suppose we could try to follow llvm-gcc's convention.  That
said, LLVM type names aren't really reliable in the first place, since
identical types are merged.  And we don't always generate struct types
in quite the same way as llvm-gcc (clang generates padding and unions
quite differently).

> Can we change clang so that clang respects llvm-gcc's ABI? I would
> appreciate this change (I'm using clang, while my colleague is using
> llvm-gcc..).

This has nothing to do with the ABI, and in fact it doesn't affect the
code's semantics at all; using the term ABI just confuses the issue.

-Eli



More information about the cfe-dev mailing list