Page MenuHomePhabricator

[Kaleidoscope] doc fix
ClosedPublic

Authored by SjoerdMeijer on Feb 12 2018, 8:47 AM.

Details

Summary

Chapter 2 says that the first code example can be compiled with:

clang++ -g -O3 toy.cpp

but this doesn't compile because of the use of:

llvm::make_unique

One way to solve this is to change this to std::make_unique and add -std=c++-14
to the command line. But since the tutorial's aim is to use LLVM anyway, a
minimal change is to just add llvm-config --cxxflags.

Diff Detail

Repository
rL LLVM

Event Timeline

SjoerdMeijer created this revision.Feb 12 2018, 8:47 AM
silvas accepted this revision.Mar 15 2018, 3:53 PM

LGTM with a nit.

docs/tutorial/LangImpl02.rst
719 ↗(On Diff #133874)

Please use something like this verbiage that is present in LangImpl03+

Here is the complete code listing for our running example, enhanced with
the LLVM code generator. Because this uses the LLVM libraries, we need
to link them in. To do this, we use the
`llvm-config <http://llvm.org/cmds/llvm-config.html>`_ tool to inform
our makefile/command line about which options to use:
This revision is now accepted and ready to land.Mar 15 2018, 3:53 PM

Thanks! And I will fix this before committing.

Closed by commit rL327989: [Kaleidoscope] doc fix (authored by SjoerdMeijer, committed by ). · Explain WhyMar 20 2018, 8:39 AM
This revision was automatically updated to reflect the committed changes.