In section 3.4 of the Kaleidoscope Tutorial, there are some code snippets relating to PrototypeAST::codegen()
Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); <- note here
In the final Full code listing, this was changed to
Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule.get()); <-
This simple patch changes the first code snippet to be consistent with the second part.