[PATCH] D119794: [WebAssembly] Allow .data shorthand for .section .data.0,"",@
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 16:18:54 PST 2022
sbc100 added inline comments.
================
Comment at: llvm/lib/MC/MCParser/WasmAsmParser.cpp:97
+ auto *WS = getContext().getWasmSection(
+ Name, SectionKind::getData(), 0, "", MCContext::GenericSectionID);
+ getStreamer().SwitchSection(WS);
----------------
Looking at how this works in ELF it looks like it just calls `ELFAsmParser::ParseSectionSwitch` which doesn't need a name at all. What happens if you just skip the name and call `getWasmSection` without a name? I think it should just find the default data section which is probably what we want.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119794/new/
https://reviews.llvm.org/D119794
More information about the llvm-commits
mailing list