This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use wasm::Signature for in ObjectWriter (NFC)
ClosedPublic

Authored by aheejin on Sep 28 2020, 9:19 AM.

Details

Summary

There are two WasmSignature structs, one in
include/llvm/BinaryFormat/Wasm.h and the other in
lib/MC/WasmObjectWriter.cpp. I don't know why they got separated in this
way in the first place, but it seems we can unify them to use the one in
Wasm.h for all cases.

Diff Detail

Event Timeline

aheejin created this revision.Sep 28 2020, 9:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2020, 9:19 AM
aheejin requested review of this revision.Sep 28 2020, 9:19 AM
aheejin retitled this revision from [WebAssembly] Use wasm::Signature for in ObjectWriter to [WebAssembly] Use wasm::Signature for in ObjectWriter (NFC).Sep 28 2020, 9:23 AM
sbc100 accepted this revision.Sep 28 2020, 9:43 AM

I think this is probably just historical. llvm/Object/WasmTraits.h is relatively new I think. My original plan was to keep the public interface to llvm/Object/ very dumb without any classes or methods, but I think it has evolved into something a little more rich now.

This revision is now accepted and ready to land.Sep 28 2020, 9:43 AM
dschuff accepted this revision.Sep 28 2020, 10:31 AM

LGTM too; I think I created wasm::WasmSignature in service of some other purpose (https://reviews.llvm.org/D52580) and never got around to finishing the job of removing this code...