Generalize emitAbsoluteSymbolDiff.
[oota-llvm.git] / lib / MC / MCSectionELF.cpp
index da3868273a7759a1ab8e318f430b67a567aedff1..b4448d79a2d5b5925253902ec1c02d3461713f52 100644 (file)
@@ -24,7 +24,7 @@ MCSectionELF::~MCSectionELF() {} // anchor.
 bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
                                               const MCAsmInfo &MAI) const {
 
-  if (Unique)
+  if (isUnique())
     return false;
 
   // FIXME: Does .section .bss/.data/.text work everywhere??
@@ -64,8 +64,10 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
 
   if (ShouldOmitSectionDirective(SectionName, MAI)) {
     OS << '\t' << getSectionName();
-    if (Subsection)
-      OS << '\t' << *Subsection;
+    if (Subsection) {
+      OS << '\t';
+      Subsection->print(OS, &MAI);
+    }
     OS << '\n';
     return;
   }
@@ -148,13 +150,16 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
     OS << ",comdat";
   }
 
-  if (Unique)
-    OS << ",unique";
+  if (isUnique())
+    OS << ",unique," << UniqueID;
 
   OS << '\n';
 
-  if (Subsection)
-    OS << "\t.subsection\t" << *Subsection << '\n';
+  if (Subsection) {
+    OS << "\t.subsection\t";
+    Subsection->print(OS, &MAI);
+    OS << '\n';
+  }
 }
 
 bool MCSectionELF::UseCodeAlign() const {