[PATCH] D43406: Merge two small functions and add comments.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 13:03:37 PST 2018


ruiu 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 {
----------------
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.


https://reviews.llvm.org/D43406





More information about the llvm-commits mailing list