forked from OSchip/llvm-project
[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
This commit is contained in:
parent
92fb310151
commit
972fe43133
|
@ -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);
|
||||
|
|
|
@ -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<Metadata *, 8> 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue