[NFC] Fix line endings for OptionStrCmp.h and .td test files (#109806)

Fix line endings for these files to Unix style.
This commit is contained in:
Rahul Joshi 2024-09-24 12:24:17 -07:00 committed by GitHub
parent 9830156f62
commit ec31f76df1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 70 additions and 70 deletions

View File

@ -1,32 +1,32 @@
//===- OptionStrCmp.h - Option String Comparison ----------------*- C++ -*-===// //===- OptionStrCmp.h - Option String Comparison ----------------*- C++ -*-===//
// //
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information. // See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef LLVM_SUPPORT_OPTIONSTRCMP_H #ifndef LLVM_SUPPORT_OPTIONSTRCMP_H
#define LLVM_SUPPORT_OPTIONSTRCMP_H #define LLVM_SUPPORT_OPTIONSTRCMP_H
#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringRef.h"
namespace llvm { namespace llvm {
// Comparison function for Option strings (option names & prefixes). // Comparison function for Option strings (option names & prefixes).
// The ordering is *almost* case-insensitive lexicographic, with an exception. // The ordering is *almost* case-insensitive lexicographic, with an exception.
// '\0' comes at the end of the alphabet instead of the beginning (thus options // '\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 // precede any other options which prefix them). Additionally, if two options
// are identical ignoring case, they are ordered according to case sensitive // are identical ignoring case, they are ordered according to case sensitive
// ordering if `FallbackCaseSensitive` is true. // ordering if `FallbackCaseSensitive` is true.
int StrCmpOptionName(StringRef A, StringRef B, int StrCmpOptionName(StringRef A, StringRef B,
bool FallbackCaseSensitive = true); bool FallbackCaseSensitive = true);
// Comparison function for Option prefixes. // Comparison function for Option prefixes.
int StrCmpOptionPrefixes(ArrayRef<StringRef> APrefixes, int StrCmpOptionPrefixes(ArrayRef<StringRef> APrefixes,
ArrayRef<StringRef> BPrefixes); ArrayRef<StringRef> BPrefixes);
} // namespace llvm } // namespace llvm
#endif // LLVM_SUPPORT_OPTIONSTRCMP_H #endif // LLVM_SUPPORT_OPTIONSTRCMP_H

View File

@ -1,6 +1,6 @@
// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s -DFILE=%s // RUN: not llvm-tblgen %s 2>&1 | FileCheck %s -DFILE=%s
// CHECK: [[FILE]]:[[@LINE+2]]:33: error: expected list type argument in unary operator // CHECK: [[FILE]]:[[@LINE+2]]:33: error: expected list type argument in unary operator
class Flatten<int A> { class Flatten<int A> {
list<int> F = !listflatten(A); list<int> F = !listflatten(A);
} }

View File

@ -1,32 +1,32 @@
// RUN: llvm-tblgen %s | FileCheck %s // RUN: llvm-tblgen %s | FileCheck %s
class Flatten<list<int> A, list<int> B> { class Flatten<list<int> A, list<int> B> {
list<int> Flat1 = !listflatten([A, B, [6], [7, 8]]); list<int> Flat1 = !listflatten([A, B, [6], [7, 8]]);
list<list<int>> X = [A, B]; list<list<int>> X = [A, B];
list<int> Flat2 = !listflatten(!listconcat(X, [[7]])); list<int> Flat2 = !listflatten(!listconcat(X, [[7]]));
// Generate a nested list of integers. // Generate a nested list of integers.
list<int> Y0 = [1, 2, 3, 4]; list<int> Y0 = [1, 2, 3, 4];
list<list<int>> Y1 = !foreach(elem, Y0, [elem]); list<list<int>> Y1 = !foreach(elem, Y0, [elem]);
list<list<list<int>>> Y2 = !foreach(elem, Y1, [elem]); list<list<list<int>>> Y2 = !foreach(elem, Y1, [elem]);
list<list<list<list<int>>>> Y3 = !foreach(elem, Y2, [elem]); list<list<list<list<int>>>> Y3 = !foreach(elem, Y2, [elem]);
// Flatten it completely. // Flatten it completely.
list<int> Flat3=!listflatten(!listflatten(!listflatten(Y3))); list<int> Flat3=!listflatten(!listflatten(!listflatten(Y3)));
// Flatten it partially. // Flatten it partially.
list<list<list<int>>> Flat4 = !listflatten(Y3); list<list<list<int>>> Flat4 = !listflatten(Y3);
list<list<int>> Flat5 = !listflatten(!listflatten(Y3)); list<list<int>> Flat5 = !listflatten(!listflatten(Y3));
// Test NOP flattening. // Test NOP flattening.
list<string> Flat6 = !listflatten(["a", "b"]); list<string> Flat6 = !listflatten(["a", "b"]);
} }
// CHECK: list<int> Flat1 = [1, 2, 3, 4, 5, 6, 7, 8]; // 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> Flat2 = [1, 2, 3, 4, 5, 7];
// CHECK: list<int> Flat3 = [1, 2, 3, 4]; // CHECK: list<int> Flat3 = [1, 2, 3, 4];
// CHECK{LITERAL}: list<list<list<int>>> Flat4 = [[[1]], [[2]], [[3]], [[4]]]; // CHECK{LITERAL}: list<list<list<int>>> Flat4 = [[[1]], [[2]], [[3]], [[4]]];
// CHECK: list<string> Flat6 = ["a", "b"]; // CHECK: list<string> Flat6 = ["a", "b"];
def F : Flatten<[1,2], [3,4,5]>; def F : Flatten<[1,2], [3,4,5]>;