[all-commits] [llvm/llvm-project] 13fa17: [split-file] Respect input file's line endings

Chris B via All-commits all-commits at lists.llvm.org
Fri Jan 21 16:45:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13fa17db3a720d149bcd0783856347a4f09cf634
      https://github.com/llvm/llvm-project/commit/13fa17db3a720d149bcd0783856347a4f09cf634
  Author: Chris Bieneman <beanz at abolishcrlf.org>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M llvm/.gitattributes
    A llvm/test/tools/split-file/Inputs/basic-aa.crlf
    A llvm/test/tools/split-file/Inputs/basic-bb.crlf
    A llvm/test/tools/split-file/basic.crlf.test
    M llvm/tools/split-file/split-file.cpp

  Log Message:
  -----------
  [split-file] Respect input file's line endings

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.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D117897




More information about the All-commits mailing list