Preliminary ARM debug support based on patch by Mikael of FlexyCore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60851 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index f44b9a1..97b4a1b 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -231,8 +231,7 @@
 
   O << CurrentFnName << ":\n";
   // Emit pre-function debug information.
-  // FIXME: Dwarf support.
-  //DW.BeginFunction(&MF);
+  DW.BeginFunction(&MF);
 
   if (Subtarget->isTargetDarwin()) {
     // If the function is empty, then we need to emit *something*. Otherwise,
@@ -263,8 +262,7 @@
     O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
 
   // Emit post-function debug information.
-  // FIXME: Dwarf support.
-  //DW.EndFunction();
+  DW.EndFunction(&MF);
 
   O.flush();
 
@@ -779,16 +777,14 @@
 
 bool ARMAsmPrinter::doInitialization(Module &M) {
   // Emit initial debug information.
-  // FIXME: Dwarf support.
-  //DW.BeginModule(&M);
-  
+  DW.BeginModule(&M);
+
   bool Result = AsmPrinter::doInitialization(M);
 
   // AsmPrinter::doInitialization should have done this analysis.
   MMI = getAnalysisToUpdate<MachineModuleInfo>();
   assert(MMI);
-  // FIXME: Dwarf support.
-  //DW.SetModuleInfo(MMI);
+  DW.SetModuleInfo(MMI);
 
   // Darwin wants symbols to be quoted if they have complex names.
   if (Subtarget->isTargetDarwin())
@@ -1016,8 +1012,7 @@
 
 
     // Emit initial debug information.
-    // FIXME: Dwarf support.
-    //DW.EndModule();
+    DW.EndModule();
 
     // Funny Darwin hack: This flag tells the linker that no global symbols
     // contain code that falls through to other global symbols (e.g. the obvious
@@ -1027,8 +1022,7 @@
     O << "\t.subsections_via_symbols\n";
   } else {
     // Emit final debug information for ELF.
-    // FIXME: Dwarf support.
-    //DW.EndModule();
+    DW.EndModule();
   }
 
   return AsmPrinter::doFinalization(M);