[llvm] 1c1b002 - [NFC] Set gitattributes for line endings
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 10:08:20 PST 2022
Author: Chris Bieneman
Date: 2022-01-18T12:07:41-06:00
New Revision: 1c1b0027e86fab2b0877488abc1625a457ca70b3
URL: https://github.com/llvm/llvm-project/commit/1c1b0027e86fab2b0877488abc1625a457ca70b3
DIFF: https://github.com/llvm/llvm-project/commit/1c1b0027e86fab2b0877488abc1625a457ca70b3.diff
LOG: [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.
Added:
Modified:
llvm/.gitattributes
llvm/test/MC/AsmParser/preserve-comments-crlf.s
Removed:
################################################################################
diff --git a/llvm/.gitattributes b/llvm/.gitattributes
index 8812053169ff6..f7d256947d227 100644
--- a/llvm/.gitattributes
+++ b/llvm/.gitattributes
@@ -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
diff --git a/llvm/test/MC/AsmParser/preserve-comments-crlf.s b/llvm/test/MC/AsmParser/preserve-comments-crlf.s
index 8bf094b73ef96..27c5b2e070719 100644
--- a/llvm/test/MC/AsmParser/preserve-comments-crlf.s
+++ b/llvm/test/MC/AsmParser/preserve-comments-crlf.s
@@ -1,13 +1,13 @@
- #RUN: llvm-mc -preserve-comments -n -triple i386-linux-gnu < %s > %t
- #RUN:
diff -b %s %t
- .text
-
-foo: #Comment here
- #comment here
- nop
- #if DIRECTIVE COMMENT
- ## WHOLE LINE COMMENT
- cmpl $196, %eax ## EOL COMMENT
- #endif
- .ident "clang version 3.9.0"
- .section ".note.GNU-stack","", at progbits
+ #RUN: llvm-mc -preserve-comments -n -triple i386-linux-gnu < %s > %t
+ #RUN:
diff -b %s %t
+ .text
+
+foo: #Comment here
+ #comment here
+ nop
+ #if DIRECTIVE COMMENT
+ ## WHOLE LINE COMMENT
+ cmpl $196, %eax ## EOL COMMENT
+ #endif
+ .ident "clang version 3.9.0"
+ .section ".note.GNU-stack","", at progbits
More information about the llvm-commits
mailing list