[LLVMdev] Remaining Visual C patches

Chris Lattner sabre at nondot.org
Tue Oct 26 09:05:43 PDT 2004


On Tue, 26 Oct 2004, Morten Ofstad wrote:
> the <functional> is needed because of this declaration:
>
> struct MachineBasicBlock2IndexFunctor
>    : std::unary_function<const MachineBasicBlock*, unsigned> {
>
> How can it be moved??

You're right, it can't, except that MachineBasicBlock2IndexFunctor is
dead, so I nuked it.

> removing the <algorithm> caused a few more files to require including
> this header, I'm attaching a patch to this message.

Sounds good, patches applied:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041025/019854.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041025/019855.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041025/019856.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041025/019857.html

Thanks!

> By the way, I'm getting 2356 warnings when I build the project - most of
> them are either "type name first seen using 'struct' now seen using
> 'class'" or "type name first seen using 'class' now seen using 'struct'"
> -- are there any plans to clean this up? I saw the coding guidelines for
> LLVM says something about the use of struct vs. class, but it doesn't
> seem like this is well enforced across the project. My personal opinion
> is that 'struct' should only be used for something which a plain C
> compiler would recognize...

As Paolo pointed out, this is a recent addition to the coding standards,
in response to VC's (buggy) requirement that class & struct match up.  We
would be happy to accept patches that convert struct -> class in the
appropriate places, and I agree with your intuition of what should be a
class vs a struct.

> > If I missed any of the patches or messed them up, please let me know. :)
> > Thanks for the great patches!
>
> Thanks for the support! My diff is almost empty now, so I will start
> working on integrating LLVM with our project ...

Great!  Let us know how it goes and if you run into any other problems!

-Chris

-- 
http://llvm.org/
http://nondot.org/sabre/





More information about the llvm-dev mailing list