Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

This method is not used anywhere. Remove it.

Created using spr 1.3.7
@llvmbot
Copy link
Member

llvmbot commented Nov 9, 2025

@llvm/pr-subscribers-llvm-support

Author: Vitaly Buka (vitalybuka)

Changes

This method is not used anywhere. Remove it.


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

2 Files Affected:

  • (modified) llvm/include/llvm/Support/SpecialCaseList.h (-5)
  • (modified) llvm/lib/Support/SpecialCaseList.cpp (-13)
diff --git a/llvm/include/llvm/Support/SpecialCaseList.h b/llvm/include/llvm/Support/SpecialCaseList.h
index cb8e568de02e0..a10bbc61dcc3e 100644
--- a/llvm/include/llvm/Support/SpecialCaseList.h
+++ b/llvm/include/llvm/Support/SpecialCaseList.h
@@ -218,11 +218,6 @@ class SpecialCaseList {
     LLVM_ABI unsigned getLastMatch(StringRef Prefix, StringRef Query,
                                    StringRef Category) const;
 
-    // Helper method to search by Prefix, Query, and Category. Returns
-    // matching rule, or empty string if there is no match.
-    LLVM_ABI StringRef getLongestMatch(StringRef Prefix, StringRef Query,
-                                       StringRef Category) const;
-
   private:
     friend class SpecialCaseList;
     LLVM_ABI void preprocess(bool OrderBySize);
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index 246d90cce3a43..813fce35d88fe 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -380,17 +380,4 @@ unsigned SpecialCaseList::Section::getLastMatch(StringRef Prefix,
   return LastLine;
 }
 
-StringRef SpecialCaseList::Section::getLongestMatch(StringRef Prefix,
-                                                    StringRef Query,
-                                                    StringRef Category) const {
-  StringRef LongestRule;
-  if (const Matcher *M = findMatcher(Prefix, Category)) {
-    M->match(Query, [&](StringRef Rule, unsigned) {
-      if (LongestRule.size() < Rule.size())
-        LongestRule = Rule;
-    });
-  }
-  return LongestRule;
-}
-
 } // namespace llvm

vitalybuka added a commit to vitalybuka/llvm-project that referenced this pull request Nov 10, 2025
This method is not used anywhere. Remove it.

Pull Request: llvm#167193
Created using spr 1.3.7
vitalybuka added a commit to vitalybuka/llvm-project that referenced this pull request Nov 10, 2025
This method is not used anywhere. Remove it.

Pull Request: llvm#167193
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.

4 participants