[llvm] [BOLT][NFC] Remove unused BinaryData::hasNameRegex (PR #88618)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 05:36:29 PDT 2024


https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/88618

None

>From 2397b1377a89dc61361b588b4869aa20f66abf11 Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Sat, 13 Apr 2024 05:29:22 -0700
Subject: [PATCH] [BOLT][NFC] Remove unused BinaryData::hasNameRegex

---
 bolt/include/bolt/Core/BinaryData.h | 1 -
 bolt/lib/Core/BinaryData.cpp        | 8 --------
 2 files changed, 9 deletions(-)

diff --git a/bolt/include/bolt/Core/BinaryData.h b/bolt/include/bolt/Core/BinaryData.h
index 495163f1b61aaf..8a67b3e73b802d 100644
--- a/bolt/include/bolt/Core/BinaryData.h
+++ b/bolt/include/bolt/Core/BinaryData.h
@@ -107,7 +107,6 @@ class BinaryData {
   std::vector<MCSymbol *> &getSymbols() { return Symbols; }
 
   bool hasName(StringRef Name) const;
-  bool hasNameRegex(StringRef Name) const;
   bool nameStartsWith(StringRef Prefix) const;
 
   bool hasSymbol(const MCSymbol *Symbol) const {
diff --git a/bolt/lib/Core/BinaryData.cpp b/bolt/lib/Core/BinaryData.cpp
index 0068a935800429..e9ddf08d8695f4 100644
--- a/bolt/lib/Core/BinaryData.cpp
+++ b/bolt/lib/Core/BinaryData.cpp
@@ -55,14 +55,6 @@ bool BinaryData::hasName(StringRef Name) const {
   return false;
 }
 
-bool BinaryData::hasNameRegex(StringRef NameRegex) const {
-  Regex MatchName(NameRegex);
-  for (const MCSymbol *Symbol : Symbols)
-    if (MatchName.match(Symbol->getName()))
-      return true;
-  return false;
-}
-
 bool BinaryData::nameStartsWith(StringRef Prefix) const {
   for (const MCSymbol *Symbol : Symbols)
     if (Symbol->getName().starts_with(Prefix))



More information about the llvm-commits mailing list