Add an accessor method to DwarfWriter to tell of debugging info should be emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65092 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 6a29121..356f5a8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -1331,9 +1331,10 @@
 
 public:
 
-  /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
+  /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+  /// be emitted.
   ///
-  bool ShouldEmitDwarf() const { return shouldEmit; }
+  bool ShouldEmitDwarfDebug() const { return shouldEmit; }
 
   /// AssignAbbrevNumber - Define a unique number for the abbreviation.
   ///
@@ -2963,7 +2964,7 @@
   /// EndModule - Emit all Dwarf sections that should come after the content.
   ///
   void EndModule() {
-    if (!ShouldEmitDwarf()) return;
+    if (!ShouldEmitDwarfDebug()) return;
 
     // Standard sections final addresses.
     Asm->SwitchToSection(TAI->getTextSection());
@@ -3021,7 +3022,7 @@
   void BeginFunction(MachineFunction *MF) {
     this->MF = MF;
 
-    if (!ShouldEmitDwarf()) return;
+    if (!ShouldEmitDwarfDebug()) return;
 
     // Begin accumulating function debug information.
     MMI->BeginFunction(MF);
@@ -3040,7 +3041,7 @@
   /// EndFunction - Gather and emit post-function debug information.
   ///
   void EndFunction(MachineFunction *MF) {
-    if (!ShouldEmitDwarf()) return;
+    if (!ShouldEmitDwarfDebug()) return;
 
     // Define end label for subprogram.
     EmitLabel("func_end", SubprogramCount);
@@ -4329,3 +4330,8 @@
   DD->RecordVariable(GV, FrameIndex);
 }
 
+/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+/// be emitted.
+bool DwarfWriter::ShouldEmitDwarfDebug() const {
+  return DD->ShouldEmitDwarfDebug();
+}