This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use ArrayRef over raw pointers
ClosedPublic

Authored by sbc100 on Jan 12 2018, 2:49 PM.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sbc100 created this revision.Jan 12 2018, 2:49 PM
sbc100 added a reviewer: ruiu.Jan 12 2018, 2:50 PM
sbc100 updated this revision to Diff 129713.Jan 12 2018, 2:51 PM
  • clang-format
ruiu added inline comments.Jan 12 2018, 2:51 PM
wasm/InputChunks.h
148–151

In lld we don't usually define trivial accessors but instead use data members directly.

sbc100 added inline comments.Jan 12 2018, 2:54 PM
wasm/InputChunks.h
148–151

Its only trivial for this subclass.. the method is used on the base class and different subclass have different implementations of data().

ruiu accepted this revision.Jan 12 2018, 2:56 PM

LGTM

data().data() doesn't look very pretty, but that's not your fault...

This revision is now accepted and ready to land.Jan 12 2018, 2:56 PM
This revision was automatically updated to reflect the committed changes.