diff --git a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp b/llvm/examples/Kaleidoscope/Chapter9/toy.cpp --- a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp +++ b/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 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);