simplify EmitSectionOffset to always use .set if it is
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything.  Make EmitSectionOffset call EmitDifference
instead of duplicating it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98005 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 23b2158..52a4055 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -278,39 +278,18 @@
 
 void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label,
                                      const MCSymbol *Section,
-                                     bool IsSmall, bool isEH,
-                                     bool useSet) {
+                                     bool IsSmall, bool isEH) {
   bool printAbsolute = false;
   if (isEH)
     printAbsolute = MAI->isAbsoluteEHSectionOffsets();
   else
     printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
 
-  if (MAI->hasSetDirective() && useSet) {
-    // FIXME: switch to OutStreamer.EmitAssignment.
-    O << "\t.set\t";
-    PrintLabelName("set", SetCounter, Flavor);
-    O << ",";
-    PrintLabelName(Label);
-
-    if (!printAbsolute) {
-      O << "-";
-      PrintLabelName(Section);
-    }
-
-    O << "\n";
-    PrintRelDirective(IsSmall);
-    PrintLabelName("set", SetCounter, Flavor);
-    ++SetCounter;
-  } else {
-    PrintRelDirective(IsSmall, true);
-    PrintLabelName(Label);
-
-    if (!printAbsolute) {
-      O << "-";
-      PrintLabelName(Section);
-    }
-  }
+  if (!printAbsolute)
+    return EmitDifference(Label, Section, IsSmall);
+  
+  PrintRelDirective(IsSmall, true);
+  PrintLabelName(Label);
 }
 
 /// EmitFrameMoves - Emit frame instructions to describe the layout of the