[codeview] Wire up the .cv_inline_linetable directive

This directive emits the binary annotations that describe line and code
deltas in inlined call sites. Single-stepping through inlined frames in
windbg now works.

llvm-svn: 259535
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index 4883905..d9f38f3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -48,7 +48,8 @@
     MapVector<const DILocation *, InlineSite> InlineSites;
 
     DebugLoc LastLoc;
-    MCSymbol *End = nullptr;
+    const MCSymbol *Begin = nullptr;
+    const MCSymbol *End = nullptr;
     unsigned FuncId = 0;
     unsigned LastFileId = 0;
     bool HaveLineInfo = false;
@@ -59,6 +60,10 @@
 
   InlineSite &getInlineSite(const DILocation *Loc);
 
+  static void collectInlineSiteChildren(SmallVectorImpl<unsigned> &Children,
+                                        const FunctionInfo &FI,
+                                        const InlineSite &Site);
+
   /// Remember some debug info about each function. Keep it in a stable order to
   /// emit at the end of the TU.
   MapVector<const Function *, FunctionInfo> FnDebugInfo;
@@ -66,6 +71,8 @@
   /// Map from DIFile to .cv_file id.
   DenseMap<const DIFile *, unsigned> FileIdMap;
 
+  SmallSetVector<const DISubprogram *, 4> InlinedSubprograms;
+
   DenseMap<const DISubprogram *, codeview::TypeIndex> SubprogramToFuncId;
 
   unsigned TypeCount = 0;
@@ -93,6 +100,8 @@
 
   void emitTypeInformation();
 
+  void emitInlineeLinesSubsection();
+
   void emitDebugInfoForFunction(const Function *GV, FunctionInfo &FI);
 
   void emitInlinedCallSite(const FunctionInfo &FI, const DILocation *InlinedAt,