[NFC] Set gitattributes for line endings

A clean checkout of LLVM using core.autocrlf=on for Windows cannot pass
the LLVM test suite because several test input files rely on specific
line endings.

This change updates the line ending attributes for impacted tests and
re-normalizes a CRLF test case that was committed as LF to the git
index.
This commit is contained in:
Chris Bieneman 2022-01-18 11:01:36 -06:00
parent 3049d51e98
commit 1c1b0027e8
2 changed files with 24 additions and 19 deletions

17
llvm/.gitattributes vendored
View File

@ -1,20 +1,25 @@
# binary files
test/Object/Inputs/*.a-* binary
test/Object/Inputs/*.a* binary
test/tools/dsymutil/Inputs/*.o binary
test/tools/dsymutil/Inputs/*.a binary
test/tools/dsymutil/Inputs/*.i386 binary
test/tools/dsymutil/Inputs/*.x86_64 binary
test/tools/dsymutil/Inputs/*.armv7m binary
test/tools/dsymutil/Inputs/*.dylib binary
test/tools/dsymutil/Inputs/*.dSYM binary
test/tools/dsymutil/Inputs/*.swiftmodule binary
test/tools/llvm-ar/Inputs/*.lib binary
test/tools/llvm-ar/Inputs/*.a binary
test/tools/llvm-objdump/Inputs/*.a binary
test/tools/llvm-rc/Inputs/* binary
test/tools/llvm-strings/Inputs/numbers binary
test/MC/AsmParser/incbin_abcd binary
test/YAMLParser/spec-09-02.test binary
# These files must have CRLF line endings, therefore git should treat them as
# binary and not autoconvert line endings (for example, when core.autocrlf is
# on).
test/MC/AsmParser/preserve-comments-crlf.s binary
test/tools/llvm-mca/X86/directives-handle-crlf.s binary
# These files must have CRLF line endings, therefore git should explicity treat
# them as always having crlf line endings
test/MC/AsmParser/preserve-comments-crlf.s text eol=crlf
test/tools/llvm-mca/X86/directives-handle-crlf.s text eol=crlf
# These files must have LF line endings because the test requires exact matching
test/tools/llvm-strings/radix.test text eol=lf