Heads up, g++ in Xcode 5 points to Clang
David Nadlinger
code at klickverbot.at
Mon Oct 28 14:24:39 PDT 2013
On Monday, 28 October 2013 at 21:07:07 UTC, Iain Buclaw wrote:
> From what I've read and gathered from David over a period of
> some
> conversations. Clang infrastructure-wise is much like
> gcc-3.3/gcc-4.0
> was - they have a well defined AST that is capable of
> representing
> everything you'd expect in a typical C-family language, with a
> backdoor to lower level register/assembly representations for
> target-specific implementations.
If you are referring to LLVM here: Yes and no.
It's true that the LLVM IR is mostly target-independent (except
for data type sizes and so on) with a number of backdoors in the
form of inline assembly, special intrinsics and so on.
But at the same time, the LLVM IR is also of a very different
quality than GCC GENERIC, being strictly in SSA form. I have not
looked into the current GCC architecture in any detail, but I'd
guess that LLVM itself starts approximately at the point where
the middle-end does in GCC.
Clang itself is obviously on a higher layer, but unlike GENERIC,
its data structures are not designed to be reused for
non-C-family languages. So, the questions of whether its AST can
represent every concept from another language or if it needs
contains backdoors to a lower level are somewhat moot.
David
More information about the Digitalmars-d
mailing list