Kaleidoscope - C++11 modernization.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 15:18:23 PDT 2015


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?

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/20150817/3e26a0da/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kaledioscope-C++11-update.patch
Type: application/octet-stream
Size: 147516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150817/3e26a0da/attachment-0001.obj>


More information about the llvm-commits mailing list