[cfe-dev] Using C++11 in clang/tools/extra
dblaikie at gmail.com
Wed Nov 28 08:31:53 PST 2012
On Wed, Nov 28, 2012 at 7:15 AM, Vane, Edwin <edwin.vane at intel.com> wrote:
> Hi all,
> It came up in a recent code review (http://llvm-reviews.chandlerc.com/D136) that C++11 features aren't allowed in the codebase. I can understand the reason for this in the LLVM and clang codebases as they're both widely used. However, would it be a problem to use C++11 officially in clang/tools/extra? It's not nearly as widely used and has less of a chance of impacting critical work in the community. Are there other problems I'm missing? If not, could the use of C++11 in clang/tools/extra be officially blessed?
I'd +1 this but with a few points:
1) one of the reasons C++11 isn't allowed is a bootstrapping issue (if
we use the full power of C++11 that only Clang implements, how do we
compile Clang? Do we end up in a situation where you have to build a
series of older Clang's to step up to the latest?). This argument only
really applies to the core path through the compiler - enough that we
can build a Clang that can compile C++11. (this could, for example,
mean that many of the middle end optimizers in LLVM could be written
in C++11, so long as enough were kept in C++98 that we could
2) Clang selfhosting isn't a bulletproof option on every platform.
Windows support, for example, is still a bit patchy. So we might need
to restrict ourselves to the subset of C++11 available on a reasonable
selection of platforms/compilers.
This is already being done in the lld project so we do have precedent
for one possible set of tradeoffs & choices in this regard.
> Edwin Vane
> Software Developer
> Intel of Canada, Inc.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev