[PATCH] D83834: Add test utility 'extract'

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 01:09:38 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/tools/extract/extract.cpp:87
+  uint8_t *buf = (*outputBuf)->getBufferStart();
+  std::fill_n(buf, numEmptyLines, '\n');
+  std::copy(docBegin, docEnd, buf + numEmptyLines);
----------------
jhenderson wrote:
> If I read this correctly, this will print a series of empty lines before the output. I'm not sure I see the benefit of that? What about empty lines after the contents?
Oh, I just read the mailing list comment saying this is to preserve line numbers. It might be helpful having a comment here in the code explaining this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83834/new/

https://reviews.llvm.org/D83834





More information about the llvm-commits mailing list