[llvm] [MC] Remove deprecated lookupTarget overload (PR #196778)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 22:55:37 PDT 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/196778

This has been deprecated for a while and was slated for removal after
the branching of LLVM 22. Remove it since I'm on on the Google integrate
rotation this week and can take care of any failures on our end.

>From b52ae8a6645d2b3cf4360a2bfebc582d18f42b05 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 10 May 2026 05:54:13 +0000
Subject: [PATCH] [MC] Remove deprecated lookupTarget overload

This has been deprecated for a while and was slated for removal after
the branching of LLVM 22. Remove it since I'm on on the Google integrate
rotation this week and can take care of any failures on our end.
---
 llvm/include/llvm/MC/TargetRegistry.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index f7ecc71132e94..b111342aec140 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -723,17 +723,6 @@ struct TargetRegistry {
 
   LLVM_ABI static iterator_range<iterator> targets();
 
-  /// lookupTarget - Lookup a target based on a target triple.
-  ///
-  /// \param TripleStr - The triple to use for finding a target.
-  /// \param Error - On failure, an error string describing why no target was
-  /// found.
-  // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
-  [[deprecated("Use overload accepting Triple instead")]]
-  static const Target *lookupTarget(StringRef TripleStr, std::string &Error) {
-    return lookupTarget(Triple(TripleStr), Error);
-  }
-
   /// lookupTarget - Lookup a target based on a target triple.
   ///
   /// \param Triple - The triple to use for finding a target.



More information about the llvm-commits mailing list