[PATCH] D128628: [Kaleidoscope] Remove unused function argument

Marc Auberer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 10:54:05 PDT 2022


marcauberer updated this revision to Diff 441082.
marcauberer added a comment.

Adjust tutorial code listing in text section


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128628/new/

https://reviews.llvm.org/D128628

Files:
  llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
  llvm/examples/Kaleidoscope/Chapter9/toy.cpp


Index: llvm/examples/Kaleidoscope/Chapter9/toy.cpp
===================================================================
--- llvm/examples/Kaleidoscope/Chapter9/toy.cpp
+++ llvm/examples/Kaleidoscope/Chapter9/toy.cpp
@@ -852,7 +852,7 @@
       Scope->getContext(), AST->getLine(), AST->getCol(), Scope));
 }
 
-static DISubroutineType *CreateFunctionType(unsigned NumArgs, DIFile *Unit) {
+static DISubroutineType *CreateFunctionType(unsigned NumArgs) {
   SmallVector<Metadata *, 8> EltTys;
   DIType *DblTy = KSDbgInfo.getDoubleTy();
 
@@ -1253,7 +1253,7 @@
   unsigned ScopeLine = LineNo;
   DISubprogram *SP = DBuilder->createFunction(
       FContext, P.getName(), StringRef(), Unit, LineNo,
-      CreateFunctionType(TheFunction->arg_size(), Unit), ScopeLine,
+      CreateFunctionType(TheFunction->arg_size()), ScopeLine,
       DINode::FlagPrototyped, DISubprogram::SPFlagDefinition);
   TheFunction->setSubprogram(SP);
 
Index: llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
===================================================================
--- llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
+++ llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
@@ -261,7 +261,7 @@
   unsigned ScopeLine = 0;
   DISubprogram *SP = DBuilder->createFunction(
       FContext, P.getName(), StringRef(), Unit, LineNo,
-      CreateFunctionType(TheFunction->arg_size(), Unit),
+      CreateFunctionType(TheFunction->arg_size()),
       false /* internal linkage */, true /* definition */, ScopeLine,
       DINode::FlagPrototyped, false);
   TheFunction->setSubprogram(SP);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128628.441082.patch
Type: text/x-patch
Size: 1592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/79c07da9/attachment.bin>


More information about the llvm-commits mailing list