llvm-project/llvm/lib/MC/MCParser
Sam Clegg 3b8d2be527 Reland: "[lld][WebAssembly] Initial support merging string data"
This change was originally landed in: 5000a1b4b9
It was reverted in: 061e071d8c

This change adds support for a new WASM_SEG_FLAG_STRINGS flag in
the object format which works in a similar fashion to SHF_STRINGS
in the ELF world.

Unlike the ELF linker this support is currently limited:
- No support for SHF_MERGE (non-string merging)
- Always do full tail merging ("lo" can be merged with "hello")
- Only support single byte strings (p2align 0)

Like the ELF linker merging is only performed at `-O1` and above.

This fixes part of https://bugs.llvm.org/show_bug.cgi?id=48828,
although crucially it doesn't not currently support debug sections
because they are not represented by data segments (they are custom
sections)

Differential Revision: https://reviews.llvm.org/D97657
2021-05-10 16:03:38 -07:00
..
AsmLexer.cpp [AsmParser][SystemZ][z/OS] Reject character and string literals for HLASM 2021-05-05 10:21:55 -04:00
AsmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
COFFAsmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
COFFMasmParser.cpp [llvm] Don't include StringSwitch.h where unnecessary (NFC) 2021-01-21 19:59:48 -08:00
DarwinAsmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
ELFAsmParser.cpp [LTO][MC] Discard non-prevailing defined symbols in module-level assembly 2021-03-18 15:33:42 -07:00
MCAsmLexer.cpp
MCAsmParser.cpp [MC] Add parseEOL() overload and migrate some parseToken(AsmToken::EndOfStatement) to parseEOL() 2021-03-06 17:45:23 -08:00
MCAsmParserExtension.cpp [COFF] Add cg_profile directive and .llvm.call-graph-profile section 2020-07-10 17:07:30 -07:00
MCTargetAsmParser.cpp
MasmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
WasmAsmParser.cpp Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00