aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-02-13 08:38:18 -0800
committerSam Clegg <sbc@chromium.org>2020-02-20 22:49:08 -0800
commitdf74033ec9fceb0c7c1c44a61f240c05c4d5b368 (patch)
tree423c43a0164a03edb76eb4daf425c75a78979c07 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent457660683154014db4b649e852d152354844338a (diff)
downloadllvm-df74033ec9fceb0c7c1c44a61f240c05c4d5b368.zip
llvm-df74033ec9fceb0c7c1c44a61f240c05c4d5b368.tar.gz
llvm-df74033ec9fceb0c7c1c44a61f240c05c4d5b368.tar.bz2
[WebAssembly] Remove unneeded getWasmKindForNamedSection function
I believe this was carried over from getELFKindForNamedSection since the wasm backend originally used ELF object writing as a template. Differential Revision: https://reviews.llvm.org/D74565
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 1a46691..c2896f0 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1691,16 +1691,6 @@ static const Comdat *getWasmComdat(const GlobalValue *GV) {
return C;
}
-static SectionKind getWasmKindForNamedSection(StringRef Name, SectionKind K) {
- // If we're told we have function data, then use that.
- if (K.isText())
- return SectionKind::getText();
-
- // Otherwise, ignore whatever section type the generic impl detected and use
- // a plain data section.
- return SectionKind::getData();
-}
-
MCSection *TargetLoweringObjectFileWasm::getExplicitSectionGlobal(
const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
// We don't support explict section names for functions in the wasm object
@@ -1711,8 +1701,6 @@ MCSection *TargetLoweringObjectFileWasm::getExplicitSectionGlobal(
StringRef Name = GO->getSection();
- Kind = getWasmKindForNamedSection(Name, Kind);
-
StringRef Group = "";
if (const Comdat *C = getWasmComdat(GO)) {
Group = C->getName();