[PATCH] D43406: Merge two small functions and add comments.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 14:36:12 PST 2018
sbc100 added inline comments.
================
Comment at: lld/wasm/InputChunks.cpp:79
-static void applyRelocations(uint8_t *Buf, ArrayRef<OutputRelocation> Relocs) {
- if (!Relocs.size())
+// Copy this input chunk to an mmap'ed output file.
+void InputChunk::writeTo(uint8_t *Buf) const {
----------------
ruiu wrote:
> sbc100 wrote:
> > ruiu wrote:
> > > sbc100 wrote:
> > > > How do you feel about documentation here vs declaration in the .h file?
> > > Why not both? :)
> > Not sure that makes sense. It means the old probably of comments being out-of-date is now double because the can also be out of date with themselves! :)
> writeTo() is actually pretty stable interface and I don't think it would change. But if you don't want to have duplicate comments, I can remove it from, perhaps, .h file, because we have bunch of comments in this file rather than in the .h file.
I don't feel strongly but I feel like we should probably be consistent and decide which we prefer (.h or .cpp). No urgent need to fix this one now.
https://reviews.llvm.org/D43406
More information about the llvm-commits
mailing list