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);