-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[NFC] Fix line endings for OptionStrCmp.h and .td test files #109806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix line endings for these files to Unix style.
@llvm/pr-subscribers-llvm-support Author: Rahul Joshi (jurahul) ChangesFix line endings for these files to Unix style. Full diff: https://github.com/llvm/llvm-project/pull/109806.diff 3 Files Affected:
diff --git a/llvm/include/llvm/Support/OptionStrCmp.h b/llvm/include/llvm/Support/OptionStrCmp.h
index d417fe675e292d..f3d3c2adb902f3 100644
--- a/llvm/include/llvm/Support/OptionStrCmp.h
+++ b/llvm/include/llvm/Support/OptionStrCmp.h
@@ -1,32 +1,32 @@
-//===- OptionStrCmp.h - Option String Comparison ----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_OPTIONSTRCMP_H
-#define LLVM_SUPPORT_OPTIONSTRCMP_H
-
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/StringRef.h"
-
-namespace llvm {
-
-// Comparison function for Option strings (option names & prefixes).
-// The ordering is *almost* case-insensitive lexicographic, with an exception.
-// '\0' comes at the end of the alphabet instead of the beginning (thus options
-// precede any other options which prefix them). Additionally, if two options
-// are identical ignoring case, they are ordered according to case sensitive
-// ordering if `FallbackCaseSensitive` is true.
-int StrCmpOptionName(StringRef A, StringRef B,
- bool FallbackCaseSensitive = true);
-
-// Comparison function for Option prefixes.
-int StrCmpOptionPrefixes(ArrayRef<StringRef> APrefixes,
- ArrayRef<StringRef> BPrefixes);
-
-} // namespace llvm
-
-#endif // LLVM_SUPPORT_OPTIONSTRCMP_H
+//===- OptionStrCmp.h - Option String Comparison ----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_OPTIONSTRCMP_H
+#define LLVM_SUPPORT_OPTIONSTRCMP_H
+
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringRef.h"
+
+namespace llvm {
+
+// Comparison function for Option strings (option names & prefixes).
+// The ordering is *almost* case-insensitive lexicographic, with an exception.
+// '\0' comes at the end of the alphabet instead of the beginning (thus options
+// precede any other options which prefix them). Additionally, if two options
+// are identical ignoring case, they are ordered according to case sensitive
+// ordering if `FallbackCaseSensitive` is true.
+int StrCmpOptionName(StringRef A, StringRef B,
+ bool FallbackCaseSensitive = true);
+
+// Comparison function for Option prefixes.
+int StrCmpOptionPrefixes(ArrayRef<StringRef> APrefixes,
+ ArrayRef<StringRef> BPrefixes);
+
+} // namespace llvm
+
+#endif // LLVM_SUPPORT_OPTIONSTRCMP_H
diff --git a/llvm/test/TableGen/listflatten-error.td b/llvm/test/TableGen/listflatten-error.td
index 56062420982a11..2f13356b6792f2 100644
--- a/llvm/test/TableGen/listflatten-error.td
+++ b/llvm/test/TableGen/listflatten-error.td
@@ -1,6 +1,6 @@
-// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s -DFILE=%s
-
-// CHECK: [[FILE]]:[[@LINE+2]]:33: error: expected list type argument in unary operator
-class Flatten<int A> {
- list<int> F = !listflatten(A);
-}
+// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s -DFILE=%s
+
+// CHECK: [[FILE]]:[[@LINE+2]]:33: error: expected list type argument in unary operator
+class Flatten<int A> {
+ list<int> F = !listflatten(A);
+}
diff --git a/llvm/test/TableGen/listflatten.td b/llvm/test/TableGen/listflatten.td
index bc9b1c71ea88d7..a76ac21c4ad84e 100644
--- a/llvm/test/TableGen/listflatten.td
+++ b/llvm/test/TableGen/listflatten.td
@@ -1,32 +1,32 @@
-// RUN: llvm-tblgen %s | FileCheck %s
-
-class Flatten<list<int> A, list<int> B> {
- list<int> Flat1 = !listflatten([A, B, [6], [7, 8]]);
-
- list<list<int>> X = [A, B];
- list<int> Flat2 = !listflatten(!listconcat(X, [[7]]));
-
- // Generate a nested list of integers.
- list<int> Y0 = [1, 2, 3, 4];
- list<list<int>> Y1 = !foreach(elem, Y0, [elem]);
- list<list<list<int>>> Y2 = !foreach(elem, Y1, [elem]);
- list<list<list<list<int>>>> Y3 = !foreach(elem, Y2, [elem]);
-
- // Flatten it completely.
- list<int> Flat3=!listflatten(!listflatten(!listflatten(Y3)));
-
- // Flatten it partially.
- list<list<list<int>>> Flat4 = !listflatten(Y3);
- list<list<int>> Flat5 = !listflatten(!listflatten(Y3));
-
- // Test NOP flattening.
- list<string> Flat6 = !listflatten(["a", "b"]);
-}
-
-// CHECK: list<int> Flat1 = [1, 2, 3, 4, 5, 6, 7, 8];
-// CHECK: list<int> Flat2 = [1, 2, 3, 4, 5, 7];
-// CHECK: list<int> Flat3 = [1, 2, 3, 4];
-// CHECK{LITERAL}: list<list<list<int>>> Flat4 = [[[1]], [[2]], [[3]], [[4]]];
-// CHECK: list<string> Flat6 = ["a", "b"];
-def F : Flatten<[1,2], [3,4,5]>;
-
+// RUN: llvm-tblgen %s | FileCheck %s
+
+class Flatten<list<int> A, list<int> B> {
+ list<int> Flat1 = !listflatten([A, B, [6], [7, 8]]);
+
+ list<list<int>> X = [A, B];
+ list<int> Flat2 = !listflatten(!listconcat(X, [[7]]));
+
+ // Generate a nested list of integers.
+ list<int> Y0 = [1, 2, 3, 4];
+ list<list<int>> Y1 = !foreach(elem, Y0, [elem]);
+ list<list<list<int>>> Y2 = !foreach(elem, Y1, [elem]);
+ list<list<list<list<int>>>> Y3 = !foreach(elem, Y2, [elem]);
+
+ // Flatten it completely.
+ list<int> Flat3=!listflatten(!listflatten(!listflatten(Y3)));
+
+ // Flatten it partially.
+ list<list<list<int>>> Flat4 = !listflatten(Y3);
+ list<list<int>> Flat5 = !listflatten(!listflatten(Y3));
+
+ // Test NOP flattening.
+ list<string> Flat6 = !listflatten(["a", "b"]);
+}
+
+// CHECK: list<int> Flat1 = [1, 2, 3, 4, 5, 6, 7, 8];
+// CHECK: list<int> Flat2 = [1, 2, 3, 4, 5, 7];
+// CHECK: list<int> Flat3 = [1, 2, 3, 4];
+// CHECK{LITERAL}: list<list<list<int>>> Flat4 = [[[1]], [[2]], [[3]], [[4]]];
+// CHECK: list<string> Flat6 = ["a", "b"];
+def F : Flatten<[1,2], [3,4,5]>;
+
|
kazutakahirata
approved these changes
Sep 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix line endings for these files to Unix style.