DebugInfo: Remove DIDescriptor from the DIBuilder API

As a step toward killing `DIDescriptor` and its subclasses, remove it
from the `DIBuilder` API.  Replace the subclasses with appropriate
pointers from the new debug info hierarchy.  There are a couple of
possible surprises in type choices for out-of-tree frontends:

  - Subroutine types: `MDSubroutineType`, not `MDCompositeTypeBase`.
  - Composite types: `MDCompositeType`, not `MDCompositeTypeBase`.
  - Scopes: `MDScope`, not `MDNode`.
  - Generic debug info nodes: `DebugNode`, not `MDNode`.

This is part of PR23080.

llvm-svn: 235111
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
index 21f2eb1..c7e096c 100644
--- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
@@ -836,7 +836,7 @@
       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 @@
   // 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(