This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Do not use inheritance to define SubSection.
ClosedPublic

Authored by ruiu on Feb 23 2018, 9:09 PM.

Details

Summary

SubSection inherited from SyntheticSection, and SyntheticSection inherits
from OutputSection, so SubSection was an OutputSection. But that's wrong
because SubSection is not actually a WebAssembly output section.
It shares some functionalities with OutputSection, but overall it's very
different.

This patch removes that inheritance.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ruiu created this revision.Feb 23 2018, 9:09 PM
sbc100 accepted this revision.Feb 27 2018, 4:03 PM
sbc100 added inline comments.
lld/wasm/Writer.cpp
398 ↗(On Diff #135776)

This file doesn't use the "lld::wasm" namespace explicitly when calling these writer functions.

This revision is now accepted and ready to land.Feb 27 2018, 4:03 PM
ruiu added inline comments.Feb 27 2018, 4:23 PM
lld/wasm/Writer.cpp
398 ↗(On Diff #135776)

Yes, but without this namespace specifier, this function would call itself because it's name is also writeStr

ruiu updated this revision to Diff 136193.Feb 27 2018, 4:46 PM
  • removed the fowarding member functions.
This revision was automatically updated to reflect the committed changes.