[Kaleidoscope] Fix DWARF function creation example
authorJustin Brooks <justin@jzbrooks.com>
Mon, 25 Jul 2022 18:18:53 +0000 (18:18 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 25 Jul 2022 18:19:59 +0000 (18:19 +0000)
The full code listing was fixed in fdaeb0c647eb66763721a7fe74e0a36b007dcd75

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D130217

llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst

index e74bf9b..37c234f 100644 (file)
@@ -262,8 +262,9 @@ information) and construct our function definition:
   DISubprogram *SP = DBuilder->createFunction(
       FContext, P.getName(), StringRef(), Unit, LineNo,
       CreateFunctionType(TheFunction->arg_size()),
-      false /* internal linkage */, true /* definition */, ScopeLine,
-      DINode::FlagPrototyped, false);
+      ScopeLine,
+      DINode::FlagPrototyped,
+      DISubprogram::SPFlagDefinition);
   TheFunction->setSubprogram(SP);
 
 and we now have an DISubprogram that contains a reference to all of our