[LLVMdev] Using C++'11 language features in LLVM itself
dag at cray.com
dag at cray.com
Tue Jan 8 16:24:40 PST 2013
Chris Lattner <clattner at apple.com> writes:
> It's seems like a quiet and peaceful day, lets stir things up a bit :)
>
> How crazy would it be for us to start using basic C++'11 language
> features (but not C++'11 library features) in LLVM: things like auto,
> rvalue-refs, lambdas, etc? I think that we can keep things well
> defined with a few simple requirements: language features must be
> supported by MSVC 2010 and later, some version of GCC and later (linux
> folks should pick?), some version of Clang and later (Freebsd folks?).
Note that this is NOT an official message from Cray in any way, shape or
form. I've passed on your note to our group for information but I don't
expect a serious problem with this given enough lead time.
I am personally very much in favor of this. C++11 really is a huge leap
from C++03 in terms of readability, maintainability and safety.
Why not C++11 libraries? Implementation/capatability reasons? I don't
know anything about how the various implementation compare in terms of
completeness. But the libraries use the new language features and
theoretically you get a performance boost "for free."
I'm assuming we wouldn't release an llvm with C++11 until 3.4 at least
which gives folks a good 8 months to a year to prepare. Doing it in a
3.3 release shortens that considerably but it might be ok. The biggest
issue for groups like ours is upgrading the compiler we use to build our
compiler. We have a LOT of components and they all have to work with
the new build environment. It involves a lot of testing and assurance
which is where we might bump up against a 3.3 release, not having a new
compiler in place before 3.3 is out.
As for gcc version, it looks like 4.7.2 is in Debian Wheezy and that's
usually the most common distribution to lag behind in these kinds of
things. I think that's sufficiently new for Linux but someone correct
me if that's wrong.
-David
More information about the llvm-dev
mailing list