diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1691,16 +1691,6 @@ 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 @@ StringRef Name = GO->getSection(); - Kind = getWasmKindForNamedSection(Name, Kind); - StringRef Group = ""; if (const Comdat *C = getWasmComdat(GO)) { Group = C->getName();