summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-09-12 18:31:24 +0000
committerSam Clegg <sbc@chromium.org>2017-09-12 18:31:24 +0000
commit2176a9f2a3d2e6ef4c607c241dd1d916391e0c4c (patch)
treec5d0c211f93386970c1060e84f5511cac63915a2 /llvm/lib/MC/MCContext.cpp
parent51529eb0c25ba48a83ea5f99b95708325d70c2c2 (diff)
downloadbcm5719-llvm-2176a9f2a3d2e6ef4c607c241dd1d916391e0c4c.tar.gz
bcm5719-llvm-2176a9f2a3d2e6ef4c607c241dd1d916391e0c4c.zip
[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
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp40
1 files changed, 2 insertions, 38 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 48ee84edb09..e7bd045c757 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -486,53 +486,17 @@ MCSectionCOFF *MCContext::getAssociativeCOFFSection(MCSectionCOFF *Sec,
"", 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 @@ MCSectionWasm *MCContext::getWasmSection(const Twine &Section, unsigned Type,
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;
}
OpenPOWER on IntegriCloud