ELFObjectWriter.cpp: Prune obsolete \param since r234342. [-Wdocumentation]
[oota-llvm.git] / lib / MC / MCSectionELF.cpp
index fb364c87a034dd15ebf42cf7e225dc326ffb42e3..3cd84538425db0cc3970027cdd44265aa3357551 100644 (file)
@@ -24,6 +24,9 @@ MCSectionELF::~MCSectionELF() {} // anchor.
 bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
                                               const MCAsmInfo &MAI) const {
 
+  if (isUnique())
+    return false;
+
   // FIXME: Does .section .bss/.data/.text work everywhere??
   if (Name == ".text" || Name == ".data" ||
       (Name == ".bss" && !MAI.usesELFSectionDirectiveForBSS()))
@@ -144,6 +147,10 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
     printName(OS, Group->getName());
     OS << ",comdat";
   }
+
+  if (isUnique())
+    OS << ",unique," << UniqueID;
+
   OS << '\n';
 
   if (Subsection)