[WebAssembly] Remove flags from MCSectionWasm

Looks like these were copied from the ELF sections but
don't apply to Wasm and were not used anywhere.

Also remove unused Wasm methods in MCContext.

Differential Revision: https://reviews.llvm.org/D37633

llvm-svn: 313058
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 48ee84e..e7bd045 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -486,53 +486,17 @@
                         "", 0, UniqueID);
 }
 
-void MCContext::renameWasmSection(MCSectionWasm *Section, StringRef Name) {
-  StringRef GroupName;
-  assert(!Section->getGroup() && "not yet implemented");
-
-  unsigned UniqueID = Section->getUniqueID();
-  WasmUniquingMap.erase(
-      WasmSectionKey{Section->getSectionName(), GroupName, UniqueID});
-  auto I = WasmUniquingMap.insert(std::make_pair(
-                                     WasmSectionKey{Name, GroupName, UniqueID},
-                                     Section))
-               .first;
-  StringRef CachedName = I->first.SectionName;
-  const_cast<MCSectionWasm *>(Section)->setSectionName(CachedName);
-}
-
-MCSectionWasm *MCContext::createWasmRelSection(const Twine &Name, unsigned Type,
-                                               unsigned Flags,
-                                               const MCSymbolWasm *Group) {
-  StringMap<bool>::iterator I;
-  bool Inserted;
-  std::tie(I, Inserted) =
-      RelSecNames.insert(std::make_pair(Name.str(), true));
-
-  return new (WasmAllocator.Allocate())
-      MCSectionWasm(I->getKey(), Type, Flags, SectionKind::getReadOnly(),
-                    Group, ~0, nullptr);
-}
-
-MCSectionWasm *MCContext::getWasmNamedSection(const Twine &Prefix,
-                                              const Twine &Suffix, unsigned Type,
-                                              unsigned Flags) {
-  return getWasmSection(Prefix + "." + Suffix, Type, Flags, Suffix);
-}
-
 MCSectionWasm *MCContext::getWasmSection(const Twine &Section, unsigned Type,
-                                         unsigned Flags,
                                          const Twine &Group, unsigned UniqueID,
                                          const char *BeginSymName) {
   MCSymbolWasm *GroupSym = nullptr;
   if (!Group.isTriviallyEmpty() && !Group.str().empty())
     GroupSym = cast<MCSymbolWasm>(getOrCreateSymbol(Group));
 
-  return getWasmSection(Section, Type, Flags, GroupSym, UniqueID, BeginSymName);
+  return getWasmSection(Section, Type, GroupSym, UniqueID, BeginSymName);
 }
 
 MCSectionWasm *MCContext::getWasmSection(const Twine &Section, unsigned Type,
-                                         unsigned Flags,
                                          const MCSymbolWasm *GroupSym,
                                          unsigned UniqueID,
                                          const char *BeginSymName) {
@@ -555,7 +519,7 @@
     Begin = createTempSymbol(BeginSymName, false);
 
   MCSectionWasm *Result = new (WasmAllocator.Allocate())
-      MCSectionWasm(CachedName, Type, Flags, Kind, GroupSym, UniqueID, Begin);
+      MCSectionWasm(CachedName, Type, Kind, GroupSym, UniqueID, Begin);
   Entry.second = Result;
   return Result;
 }