[PATCH] D43196: [Kaleidoscope] doc fix

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 08:47:58 PST 2018


SjoerdMeijer created this revision.
SjoerdMeijer added a reviewer: silvas.

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`.


https://reviews.llvm.org/D43196

Files:
  docs/tutorial/LangImpl02.rst


Index: docs/tutorial/LangImpl02.rst
===================================================================
--- docs/tutorial/LangImpl02.rst
+++ docs/tutorial/LangImpl02.rst
@@ -717,14 +717,12 @@
 =================
 
 Here is the complete code listing for this and the previous chapter.
-Note that it is fully self-contained: you don't need LLVM or any
-external libraries at all for this. (Besides the C and C++ standard
-libraries, of course.) To build this, just compile with:
+To build this, just compile with:
 
 .. code-block:: bash
 
     # Compile
-    clang++ -g -O3 toy.cpp
+    clang++ -g -O3 toy.cpp `llvm-config --cxxflags`
     # Run
     ./a.out
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43196.133874.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180212/361faafc/attachment-0001.bin>


More information about the llvm-commits mailing list