diff options
author | Nico Weber <thakis@chromium.org> | 2021-05-10 18:27:45 -0400 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2021-05-10 18:28:28 -0400 |
commit | 061e071d8c9b98526f35cad55a918a4f1615afd4 (patch) | |
tree | e0cdd28d1605419431e3d1b44c1210dbe4ed9b21 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 6d8b070d96197df6b5bf9fc2c53a78171ba64c6c (diff) | |
download | llvm-061e071d8c9b98526f35cad55a918a4f1615afd4.zip llvm-061e071d8c9b98526f35cad55a918a4f1615afd4.tar.gz llvm-061e071d8c9b98526f35cad55a918a4f1615afd4.tar.bz2 |
Revert "[lld][WebAssembly] Initial support merging string data"
This reverts commit 5000a1b4b9edeb9e994f2a5b36da8d48599bea49.
Breaks tests, see https://reviews.llvm.org/D97657#2749151
Easily repros locally with `ninja check-llvm-mc-webassembly`.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 54d65cc..3227fd7 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -21,7 +21,6 @@ #include "llvm/BinaryFormat/Dwarf.h" #include "llvm/BinaryFormat/ELF.h" #include "llvm/BinaryFormat/MachO.h" -#include "llvm/BinaryFormat/Wasm.h" #include "llvm/CodeGen/BasicBlockSectionUtils.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" @@ -2006,17 +2005,6 @@ static const Comdat *getWasmComdat(const GlobalValue *GV) { return C; } -static unsigned getWasmSectionFlags(SectionKind K) { - unsigned Flags = 0; - - // TODO(sbc): Add suport for K.isMergeableConst() - - if (K.isMergeableCString()) - Flags |= wasm::WASM_SEG_FLAG_STRINGS; - - return Flags; -} - 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 @@ -2040,9 +2028,9 @@ MCSection *TargetLoweringObjectFileWasm::getExplicitSectionGlobal( Group = C->getName(); } - unsigned Flags = getWasmSectionFlags(Kind); - MCSectionWasm *Section = getContext().getWasmSection( - Name, Kind, Flags, Group, MCContext::GenericSectionID); + MCSectionWasm* Section = + getContext().getWasmSection(Name, Kind, Group, + MCContext::GenericSectionID); return Section; } @@ -2074,8 +2062,7 @@ static MCSectionWasm *selectWasmSectionForGlobal( (*NextUniqueID)++; } - unsigned Flags = getWasmSectionFlags(Kind); - return Ctx.getWasmSection(Name, Kind, Flags, Group, UniqueID); + return Ctx.getWasmSection(Name, Kind, Group, UniqueID); } MCSection *TargetLoweringObjectFileWasm::SelectSectionForGlobal( |