This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Do not use default argument.
Needs ReviewPublic

Authored by ruiu on Feb 23 2018, 9:14 PM.
This revision needs review, but all reviewers have resigned.

Details

Reviewers
sbc100
Summary

I don't think blank name is an appropriate default, but is this code
correct in the first place? Don't Code and data segments have name
in WebAssembly?

Event Timeline

ruiu created this revision.Feb 23 2018, 9:14 PM

Hmm. I wonder if its worth making a CustomSection subclass. Names make no sense unless the type is WASM_SEC_CUSTOM so perhaps the baseclass could take only a type and the custom section could take only a string, otherwise this is going to lead to all the section constructors passing empty string. See Writer::createSyntheticSection too.

In answer to your question in the description. No, the only sections that have names are the custom sections. The 10 different types of builtin section can only occur once and are identified by number only.

sbc100 added a comment.Apr 6 2018, 6:52 PM

Still want to land this?

sbc100 resigned from this revision.Aug 30 2019, 4:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2019, 4:47 PM
Herald added a subscriber: sbc100. · View Herald Transcript