[cfe-dev] Targeting Clang?
Douglas Gregor
dgregor at apple.com
Fri Nov 13 11:16:35 PST 2009
Hello Rick,
On Nov 13, 2009, at 10:22 AM, Rick R wrote:
> I am considering writing a LLVM back end for Scala. A major goal of
> mine is interoperability with C (and perhaps C++)
> Would it make sense to try to leverage parts of Clang for this
> purpose?
> Is there an intermediate language for c/c++/objc that languages are
> compiled into before being compiled to LLVM?
There is no intermediate language in Clang. Clang builds its own
abstract syntax trees, which are *very* specific to C/C++/Objective-C,
and lowers them directly to LLVM IR.
> That would be optimal. If that's not possible, are there parts of
> clang that are recommended for use with other languages?
Parts of Clang's "Basic" library, such as the source manager, file
manager, and diagnostics engine, would be useful for building another
front end. Everything else is very specific to the C family of
languages.
- Doug
More information about the cfe-dev
mailing list