Make EmitIntValue more efficient and more like what we do for leb128. The
[oota-llvm.git] / lib / MC / MCSectionELF.cpp
index 5bcf81021d7af8fb35d1f3e69870d625abdb3976..59568adf7085e6d1d1463db7597b59e4aea37e2a 100644 (file)
@@ -96,6 +96,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
     OS << "progbits";
 
   if (EntrySize) {
+    assert(Flags & MCSectionELF::SHF_MERGE);
     OS << "," << EntrySize;
   }
 
@@ -106,6 +107,10 @@ bool MCSectionELF::UseCodeAlign() const {
   return getFlags() & MCSectionELF::SHF_EXECINSTR;
 }
 
+bool MCSectionELF::isVirtualSection() const {
+  return getType() == MCSectionELF::SHT_NOBITS;
+}
+
 // HasCommonSymbols - True if this section holds common symbols, this is
 // indicated on the ELF object file by a symbol with SHN_COMMON section 
 // header index.