DebugInfo: Remove DIDescriptor from the DIBuilder API
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index 21f2eb1d3adcf7c80e309b2561d9309045ab4acc..c7e096cc484e4e976151d2b92a01aebb2856b664 100644 (file)
@@ -836,7 +836,7 @@ void DebugInfo::emitLocation(ExprAST *AST) {
       DebugLoc::get(AST->getLine(), AST->getCol(), Scope));
 }
 
-static DICompositeType CreateFunctionType(unsigned NumArgs, DIFile Unit) {
+static MDSubroutineType *CreateFunctionType(unsigned NumArgs, DIFile Unit) {
   SmallVector<Metadata *, 8> EltTys;
   DIType DblTy = KSDbgInfo.getDoubleTy();
 
@@ -1226,7 +1226,7 @@ Function *PrototypeAST::Codegen() {
   // Create a subprogram DIE for this function.
   DIFile Unit = DBuilder->createFile(KSDbgInfo.TheCU->getFilename(),
                                      KSDbgInfo.TheCU->getDirectory());
-  DIDescriptor FContext = Unit;
+  MDScope *FContext = Unit;
   unsigned LineNo = Line;
   unsigned ScopeLine = Line;
   DISubprogram SP = DBuilder->createFunction(