clang-format to reduce diff in another patch.
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index d58dadf08bb6e7e5809a8900920c0ac2296bc668..289209b3df49e46f7eea887b5093b9262853e54b 100644 (file)
@@ -848,8 +848,7 @@ static DISubroutineType *CreateFunctionType(unsigned NumArgs, DIFile *Unit) {
   for (unsigned i = 0, e = NumArgs; i != e; ++i)
     EltTys.push_back(DblTy);
 
-  return DBuilder->createSubroutineType(Unit,
-                                        DBuilder->getOrCreateTypeArray(EltTys));
+  return DBuilder->createSubroutineType(DBuilder->getOrCreateTypeArray(EltTys));
 }
 
 //===----------------------------------------------------------------------===//
@@ -1252,7 +1251,8 @@ Function *FunctionAST::codegen() {
       FContext, P.getName(), StringRef(), Unit, LineNo,
       CreateFunctionType(TheFunction->arg_size(), Unit),
       false /* internal linkage */, true /* definition */, ScopeLine,
-      DINode::FlagPrototyped, false, TheFunction);
+      DINode::FlagPrototyped, false);
+  TheFunction->setSubprogram(SP);
 
   // Push the current scope.
   KSDbgInfo.LexicalBlocks.push_back(SP);