<div dir="ltr">Very early C++ compilers used to do this (circa early 1990s). AFAIK No modern compiler has done this for decades.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 5:09 PM, Hayden Livingston via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, but it used to be that it lowered to C for quite a bit of the code<br>
(not all), unless I've got my information wrong. Any body know?<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Sep 8, 2015 at 3:09 PM, mats petersson <<a href="mailto:mats@planetcatfish.com">mats@planetcatfish.com</a>> wrote:<br>
> I'm not a Clang expert, but I'm 99% sure that Clang does not convert C++<br>
> into C (or something resembling C), but converts C++ code directly to LLVM<br>
> IR, which is then further "worked on" by LLVM to improve on the code quality<br>
> via various optimization passes, and then converted to machine code (or<br>
> output as .bc or .ll from the compiler).<br>
><br>
> --<br>
> Mats<br>
><br>
> On 8 September 2015 at 23:03, Hayden Livingston via cfe-dev<br>
> <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> Is there a single well-defined point beyond which the AST has been<br>
>> lowered ( / desugared?) to essentially C, including expanding template<br>
>> information as different types?<br>
>><br>
>> Or is it pretty much adhoc all over as we proceed to LLVM IR?<br>
>><br>
>> I don't have complicated C++ code, so writing a ClangTool is not out<br>
>> of the realm of possibility for me, but I'm inquiring here if it's<br>
>> already part of the compiler<br>
>> _______________________________________________<br>
>> cfe-dev mailing list<br>
>> <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
><br>
><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>