Update tutorial to reflect the current APIs. Also correct a small omission in
LangImpl6.html (it needed to defined the 'binary :' operator).
PR9052


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142123 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html
index e46ded1..a42636f 100644
--- a/docs/tutorial/LangImpl5.html
+++ b/docs/tutorial/LangImpl5.html
@@ -259,20 +259,20 @@
 
 define double @baz(double %x) {
 entry:
-	%ifcond = fcmp one double %x, 0.000000e+00
-	br i1 %ifcond, label %then, label %else
+  %ifcond = fcmp one double %x, 0.000000e+00
+  br i1 %ifcond, label %then, label %else
 
 then:		; preds = %entry
-	%calltmp = call double @foo()
-	br label %ifcont
+  %calltmp = call double @foo()
+  br label %ifcont
 
 else:		; preds = %entry
-	%calltmp1 = call double @bar()
-	br label %ifcont
+  %calltmp1 = call double @bar()
+  br label %ifcont
 
 ifcont:		; preds = %else, %then
-	%iftmp = phi double [ %calltmp, %then ], [ %calltmp1, %else ]
-	ret double %iftmp
+  %iftmp = phi double [ %calltmp, %then ], [ %calltmp1, %else ]
+  ret double %iftmp
 }
 </pre>
 </div>
@@ -660,25 +660,25 @@
 
 define double @printstar(double %n) {
 entry:
-        ; initial value = 1.0 (inlined into phi)
-	br label %loop
+  ; initial value = 1.0 (inlined into phi)
+  br label %loop
 
 loop:		; preds = %loop, %entry
-	%i = phi double [ 1.000000e+00, %entry ], [ %nextvar, %loop ]
-        ; body
-	%calltmp = call double @putchard(double 4.200000e+01)
-        ; increment
-	%nextvar = fadd double %i, 1.000000e+00
+  %i = phi double [ 1.000000e+00, %entry ], [ %nextvar, %loop ]
+  ; body
+  %calltmp = call double @putchard(double 4.200000e+01)
+  ; increment
+  %nextvar = fadd double %i, 1.000000e+00
 
-        ; termination test
-	%cmptmp = fcmp ult double %i, %n
-	%booltmp = uitofp i1 %cmptmp to double
-	%loopcond = fcmp one double %booltmp, 0.000000e+00
-	br i1 %loopcond, label %loop, label %afterloop
+  ; termination test
+  %cmptmp = fcmp ult double %i, %n
+  %booltmp = uitofp i1 %cmptmp to double
+  %loopcond = fcmp one double %booltmp, 0.000000e+00
+  br i1 %loopcond, label %loop, label %afterloop
 
 afterloop:		; preds = %loop
-        ; loop always returns 0.0
-	ret double 0.000000e+00
+  ; loop always returns 0.0
+  ret double 0.000000e+00
 }
 </pre>
 </div>
@@ -829,10 +829,11 @@
 </div>
 
 <p>With the code for the body of the loop complete, we just need to finish up
-the control flow for it.  This code remembers the end block (for the phi node), then creates the block for the loop exit ("afterloop").  Based on the value of the
-exit condition, it creates a conditional branch that chooses between executing
-the loop again and exiting the loop.  Any future code is emitted in the
-"afterloop" block, so it sets the insertion position to it.</p>
+the control flow for it.  This code remembers the end block (for the phi node),
+then creates the block for the loop exit ("afterloop").  Based on the value of
+the exit condition, it creates a conditional branch that chooses between
+executing the loop again and exiting the loop.  Any future code is emitted in
+the "afterloop" block, so it sets the insertion position to it.</p>
   
 <div class="doc_code">
 <pre>
@@ -880,10 +881,10 @@
 
 <div class="doc_code">
 <pre>
-   # Compile
-   g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy
-   # Run
-   ./toy
+# Compile
+clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy
+# Run
+./toy
 </pre>
 </div>
 
@@ -900,9 +901,9 @@
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetSelect.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Support/IRBuilder.h"
+#include "llvm/Support/TargetSelect.h"
 #include &lt;cstdio&gt;
 #include &lt;string&gt;
 #include &lt;map&gt;
@@ -1397,7 +1398,7 @@
     if (ArgsV.back() == 0) return 0;
   }
   
-  return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp");
+  return Builder.CreateCall(CalleeF, ArgsV, "calltmp");
 }
 
 Value *IfExprAST::Codegen() {
@@ -1546,8 +1547,8 @@
 
 Function *PrototypeAST::Codegen() {
   // Make the function type:  double(double,double) etc.
-  std::vector&lt;const Type*&gt; Doubles(Args.size(),
-                                   Type::getDoubleTy(getGlobalContext()));
+  std::vector&lt;Type*&gt; Doubles(Args.size(),
+                             Type::getDoubleTy(getGlobalContext()));
   FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
                                        Doubles, false);