Skip to content

Commit 1d67ec9

Browse files
karolzwolakigcbot
authored andcommitted
Remove unnecessary StringRef ops from LLVM 22 patch
No longer needed for the LLVM 22 buildability patch.
1 parent a8b4f87 commit 1d67ec9

2 files changed

Lines changed: 1 addition & 49 deletions

File tree

IGC/Compiler/Optimizer/OpenCLPasses/DpasFuncs/DpasFuncsResolution.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SPDX-License-Identifier: MIT
1616
#include <llvm/IR/Instructions.h>
1717
#include "common/LLVMWarningsPop.hpp"
1818
#include "llvmWrapper/IR/DerivedTypes.h"
19+
#include "llvmWrapper/ADT/StringRef.h"
1920
#include "Probe/Assertion.h"
2021

2122
using namespace llvm;

external/llvm/releases/22.0.0/patches_external/llvm-22-buildability.patch

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -21,55 +21,6 @@ index d9087dd1c516..2f38555d9793 100644
2121
inline T get() const {
2222
assert(isa<T>(*this) && "Invalid accessor called");
2323
return cast<T>(*this);
24-
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
25-
index 09c6d6d6eab0..ea8ed00727be 100644
26-
--- a/llvm/include/llvm/ADT/StringRef.h
27-
+++ b/llvm/include/llvm/ADT/StringRef.h
28-
@@ -168,6 +168,14 @@ namespace llvm {
29-
return StringRef(S, size());
30-
}
31-
32-
+ [[nodiscard]] bool equals(StringRef RHS) const {
33-
+ if (size() != RHS.size())
34-
+ return false;
35-
+ if (empty())
36-
+ return true;
37-
+ return ::memcmp(data(), RHS.data(), size()) == 0;
38-
+ }
39-
+
40-
/// Check for string equality, ignoring case.
41-
[[nodiscard]] bool equals_insensitive(StringRef RHS) const {
42-
return size() == RHS.size() && compare_insensitive(RHS) == 0;
43-
@@ -265,6 +273,13 @@ namespace llvm {
44-
[[nodiscard]] bool starts_with(char Prefix) const {
45-
return !empty() && front() == Prefix;
46-
}
47-
+ [[nodiscard]] bool startswith(StringRef Prefix) const {
48-
+ return size() >= Prefix.size() &&
49-
+ compareMemory(data(), Prefix.data(), Prefix.size()) == 0;
50-
+ }
51-
+ [[nodiscard]] bool startswith(char Prefix) const {
52-
+ return !empty() && front() == Prefix;
53-
+ }
54-
55-
/// Check if this string starts with the given \p Prefix, ignoring case.
56-
[[nodiscard]] LLVM_ABI bool starts_with_insensitive(StringRef Prefix) const;
57-
@@ -278,6 +293,15 @@ namespace llvm {
58-
[[nodiscard]] bool ends_with(char Suffix) const {
59-
return !empty() && back() == Suffix;
60-
}
61-
+ /// Check if this string ends with the given \p Suffix.
62-
+ [[nodiscard]] bool endswith(StringRef Suffix) const {
63-
+ return size() >= Suffix.size() &&
64-
+ compareMemory(end() - Suffix.size(), Suffix.data(),
65-
+ Suffix.size()) == 0;
66-
+ }
67-
+ [[nodiscard]] bool endswith(char Suffix) const {
68-
+ return !empty() && back() == Suffix;
69-
+ }
70-
71-
/// Check if this string ends with the given \p Suffix, ignoring case.
72-
[[nodiscard]] LLVM_ABI bool ends_with_insensitive(StringRef Suffix) const;
7324
diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
7425
index 0f98af69f12c..28d6f730cc8c 100644
7526
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h

0 commit comments

Comments
 (0)