Skip to content

[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 1 commit into from
Sep 24, 2024

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Sep 24, 2024

Fix line endings for these files to Unix style.

Fix line endings for these files to Unix style.
@jurahul jurahul marked this pull request as ready for review September 24, 2024 19:21
@jurahul jurahul requested a review from jholewinski September 24, 2024 19:21
@llvmbot
Copy link
Member

llvmbot commented Sep 24, 2024

@llvm/pr-subscribers-llvm-support

Author: Rahul Joshi (jurahul)

Changes

Fix line endings for these files to Unix style.


Full diff: https://github.com/llvm/llvm-project/pull/109806.diff

3 Files Affected:

  • (modified) llvm/include/llvm/Support/OptionStrCmp.h (+32-32)
  • (modified) llvm/test/TableGen/listflatten-error.td (+6-6)
  • (modified) llvm/test/TableGen/listflatten.td (+32-32)
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]>;
+

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@jurahul
Copy link
Contributor Author

jurahul commented Sep 24, 2024

Thanks!

@jurahul jurahul merged commit ec31f76 into llvm:main Sep 24, 2024
12 checks passed
@jurahul jurahul deleted the fix_line_endings branch September 24, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants