From 972fe431336e57fb8aa57c35f77ecb109415106f Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Thu, 30 Jun 2022 20:46:25 +0000 Subject: [PATCH] [Kaleidoscope] Remove unused function argument Removes an unused function argument from a code listing in the Kaleidoscope turorial in step 9. Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D128628 --- llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst | 2 +- llvm/examples/Kaleidoscope/Chapter9/toy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst index 2ddd860b69d1..e74bf9b950a4 100644 --- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst +++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst @@ -261,7 +261,7 @@ information) and construct our function definition: 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); diff --git a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp b/llvm/examples/Kaleidoscope/Chapter9/toy.cpp index 1df947c875d1..17dc2332d9cc 100644 --- a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter9/toy.cpp @@ -852,7 +852,7 @@ void DebugInfo::emitLocation(ExprAST *AST) { Scope->getContext(), AST->getLine(), AST->getCol(), Scope)); } -static DISubroutineType *CreateFunctionType(unsigned NumArgs, DIFile *Unit) { +static DISubroutineType *CreateFunctionType(unsigned NumArgs) { SmallVector EltTys; DIType *DblTy = KSDbgInfo.getDoubleTy(); @@ -1253,7 +1253,7 @@ Function *FunctionAST::codegen() { 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);