This is an archive of the discontinued LLVM Phabricator instance.

Fixed code snippet in Kaleidoscope tutorial to reflect final full code listing
ClosedPublic

Authored by n0madsky on Sep 17 2018, 3:23 AM.

Details

Summary

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.

Diff Detail

Event Timeline

n0madsky created this revision.Sep 17 2018, 3:23 AM
Wilfred accepted this revision.Sep 29 2018, 2:34 PM

Looks fine by me!

Do you need commit access? If you email Chris Lattner he'll give you access, or I can apply the patch.

This revision is now accepted and ready to land.Sep 29 2018, 2:34 PM

Yes, this is my first LLVM patch and I would need commit access.

Although, for the sake of pragmatism and getting the patch in, I'd be very happy for you (or anyone else with commit access) to apply the patch.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2019, 10:37 AM