Kaleidoscope - C++11 modernization.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 11:19:07 PDT 2015
Clang-formated in r245472.
- Lang.
On Tue, Aug 18, 2015 at 11:13 AM, Lang Hames <lhames at gmail.com> wrote:
> > It does look like this adds a long line or two though - do you mind clang-format'ing
> the patch?
>
> Clang-formatting the tutorials is a good idea. I've applied this patch in
> r245322 - I'll follow up with a clang-format patch next.
>
> - Lang.
>
> On Mon, Aug 17, 2015 at 10:03 PM, Justin Bogner <mail at justinbogner.com>
> wrote:
>
>> Lang Hames via llvm-commits <llvm-commits at lists.llvm.org> writes:
>> > Hi All,
>> >
>> > Attached is a patch to partially C++11'ify the Kaleidoscope tutorials.
>> There
>> > are a few LLVM coding convention fixes and range-based for loops in
>> here, but
>> > the bulk of the patch is concerned with switching raw pointers to
>> unique_ptr.
>> >
>> > This is a significant change from the original Kaleidoscope tutorials
>> which
>> > deliberately avoided any memory management so as not to overcomplicate
>> the
>> > examples. I thought it was time to revisit this idea, since C++11 has
>> removed
>> > a lot of the complication of C++ memory management, and there's a
>> benefit to
>> > having the tutorial code more closely resemble the rest of the LLVM
>> codebase.
>> >
>> > Any thoughts/feedback on this direction?
>>
>> This is great - it isn't really harder to understand and it's that much
>> closer to what the code you'll actually want to write after reading the
>> tutorial. LGTM.
>>
>> It does look like this adds a long line or two though - do you mind
>> clang-format'ing the patch? Actually, a lot of this code predates our
>> formatting rules and you're touching half of the lines anyway, so it's
>> probably reasonable to just clang-format the whole thing in a prep patch
>> before this one if you feel like it.
>>
>> > I see this as a first step towards fully modernizing the Kaleidoscope
>> > tutorials. My next step will be to update Chapter 4 onwards to bring
>> them up
>> > to speed with the recent JIT API changes - I've already started work on
>> a
>> > follow-up patch for this. If anybody else is interested in helping me
>> bring
>> > these tutorials up to speed let me know - assistance will very welcome.
>> >
>> > - Lang.
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150819/e2bb22cf/attachment.html>
More information about the llvm-commits
mailing list