[LLVMdev] gcc 4.2 to llvm-gcc 4.2 transition
clattner at apple.com
Sat Jul 24 11:29:16 PDT 2010
On Jul 24, 2010, at 10:15 AM, Alexandre Colucci wrote:
> There are several reasons why I am currently not considering the transition to Clang (although I would love to switch to it):
> - Clang (LLVM compiler 2.x) is only integrated by default in Xcode 4 which has not been released yet. I guess it might be possible to use Clang in Xcode 3.2 and Xcode 3.1.
> - Clang is a new compiler and the C++ support is really new and might contain bugs. Moreover Apple recommends to use llvm-gcc 4.2. The default compiler with Xcode 4 will be llvm-gcc 4.2 and not clang.
Clang is actually going to be the default for new projects, but you're right that llvm-gcc is much more mature.
> - Our code is mostly written in C++. The LLVM 1.0 compiler included in Xcode 3.2.x can't compile C++ code and falls back to llvm-gcc 4.2.So even If we switch to LLVM 1.0, it is very likely that we will get the exact same issues as if we switch to llvm-gcc 4.2.
> - Some of our code (or third party code we use) contains gcc predefined macro and we also have some third party libraries. With llvm-gcc we would keep the gcc parser which means less compatibility issues.
Clang should be very compatible with GCC and its extensions, except that it is more pedantic about enforcing C++ language rules. One major feature not supported by clang yet is "microsoft/codewarrier style inline assembly". Since you are apparently using this, Clang sounds like a non-starter for you for now.
> - I am not sure if clang can generate code that runs on 10.5.
It can, but it does not support powerpc (llvm-gcc does).
More information about the llvm-dev