diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-09-13 21:38:54 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-09-13 21:38:54 +0000 |
commit | 14b1aacf107d383bde1cc7160dcd02f06ff17616 (patch) | |
tree | 6b064afe55b5c5223eb0f0c878080557176ea160 /llvm/docs/tutorial/LangImpl3.html | |
parent | 1b12ed4a0068595daa622662a1181435961cf05f (diff) | |
download | bcm5719-llvm-14b1aacf107d383bde1cc7160dcd02f06ff17616.tar.gz bcm5719-llvm-14b1aacf107d383bde1cc7160dcd02f06ff17616.zip |
Update the tutorial to match changes to examples/Kaleidoscope.
One change I'm not folding in is the removal of two unused variables that
caused warnings, because those were there for expository purposes.
llvm-svn: 81721
Diffstat (limited to 'llvm/docs/tutorial/LangImpl3.html')
-rw-r--r-- | llvm/docs/tutorial/LangImpl3.html | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/docs/tutorial/LangImpl3.html b/llvm/docs/tutorial/LangImpl3.html index 5978707e3bb..056e2134fb5 100644 --- a/llvm/docs/tutorial/LangImpl3.html +++ b/llvm/docs/tutorial/LangImpl3.html @@ -206,7 +206,8 @@ Value *BinaryExprAST::Codegen() { case '<': L = Builder.CreateFCmpULT(L, R, "cmptmp"); // Convert bool 0/1 to double 0.0 or 1.0 - return Builder.CreateUIToFP(L, Type::getDoubleTy(getGlobalContext()), "booltmp"); + return Builder.CreateUIToFP(L, Type::getDoubleTy(getGlobalContext()), + "booltmp"); default: return ErrorV("invalid binary operator"); } } @@ -307,8 +308,10 @@ bodies and external function declarations. The code starts with:</p> <pre> Function *PrototypeAST::Codegen() { // Make the function type: double(double,double) etc. - std::vector<const Type*> Doubles(Args.size(), Type::getDoubleTy(getGlobalContext())); - FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()), Doubles, false); + std::vector<const Type*> Doubles(Args.size(), + Type::getDoubleTy(getGlobalContext())); + FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()), + Doubles, false); Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); </pre> @@ -1081,8 +1084,10 @@ Value *CallExprAST::Codegen() { Function *PrototypeAST::Codegen() { // Make the function type: double(double,double) etc. - std::vector<const Type*> Doubles(Args.size(), Type::getDoubleTy(getGlobalContext())); - FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()), Doubles, false); + std::vector<const Type*> Doubles(Args.size(), + Type::getDoubleTy(getGlobalContext())); + FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()), + Doubles, false); Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); |