[cfe-dev] Clang, arm backend and SEH exceptions

Daniel Dunbar daniel at zuster.org
Sun Feb 22 10:29:11 PST 2009


Hi Vincent!

On Sun, Feb 22, 2009 at 4:53 AM, Vincent R. <forumer at smartmobili.com> wrote:
> 1) It seems that Clang is progressing very well and last time when I read
> it was posssible to
> compile a FreeBSD kernel, I realized how you did a great job.
> So now I would like to know if clang is a complete standalone compiler or
> if it stills relies on gcc
> to generate code.

As Mike said, clang is a standalone compiler. There are three main
conceptual components; (1) the driver which provides a gcc-like
interface to clang, (2) the clang front end which translates
C/Objective-C to LLVM IR, and (3) the LLVM backends for various
architectures.

> 2) I am interested by the development on arm-wince plateforms and I would
> like to know if it was
> possible to compile for this platform

This depends on at least two things:
1. clang needs to generate appropriate LLVM IR for handling the ARM
ABI. I don't know much about ARM; I suspect this isn't particularly
difficult though.

2. I do not know the status of the LLVM ARM backend. You could ask
about that on llvm-dev. In particular, platform specific stuff for
WinCE may not be done.

> 3) I have proposed a training entitled "Implementation of table-based SEH
> exceptions on ARM"
> for GCC compiler, the problem is hacking GCC is very difficult, lack of
> documentation, very old
> architecture, ... and even if for now we manage to generate some stuff we
> are far from a complete
> implementation. So I would like to know if you plan to implement SEH
> exceptions in Clang/LLVM ?
> If not do you think it would be easier for us to contribute to Clang
> instead of gcc ?

Yes, clang will support zero-cost (tabled based) exception handling
for Obj-C relatively soon. Supporting SEH once that is in place should
be mostly a matter of adding Parser/Sema support for __try, etc.

 - Daniel



More information about the cfe-dev mailing list