[PATCH] D117897: [split-file] Respect input file's line endings

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 08:50:56 PST 2022


beanz created this revision.
beanz added a reviewer: MaskRay.
Herald added a subscriber: jdoerfert.
beanz requested review of this revision.
Herald added a project: LLVM.

This change adds support for split-file to respect the line ending style
of the input file. This enables split-file to work as expected on
Windows with input files containing CRLF line endings.

The test files added along with this change mirror the existing basic
tests, but are forced to contain CRLF line endings via git attributes.
This will result in the tests always containing CRLF line endings when
checked out regardless of the user's OS.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117897

Files:
  llvm/.gitattributes
  llvm/test/tools/split-file/Inputs/basic-aa.crlf
  llvm/test/tools/split-file/Inputs/basic-bb.crlf
  llvm/test/tools/split-file/Inputs/basic-cc.crlf
  llvm/test/tools/split-file/basic.crlf.test
  llvm/tools/split-file/split-file.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117897.402005.patch
Type: text/x-patch
Size: 3293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220121/85b61958/attachment.bin>


More information about the llvm-commits mailing list