[llvm] [TargetRegistry] Deprecate string overload of lookupTarget (PR #162188)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 15:41:54 PDT 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/162188
Finish the TODO that was here in line with several of the other functions in TargetRegistry now that we have access to a triple through llvm::Module.
>From 35d67878665bdb316324d683779e2f19dd9dba19 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 6 Oct 2025 22:28:53 +0000
Subject: [PATCH] [TargetRegistry] Deprecate string overload of lookupTarget
Finish the TODO that was here in line with several of the other
functions in TargetRegistry now that we have access to a triple through
llvm::Module.
---
llvm/include/llvm/MC/TargetRegistry.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index 570d4c0e8d272..234c587c8e951 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -737,7 +737,8 @@ struct TargetRegistry {
/// \param TripleStr - The triple to use for finding a target.
/// \param Error - On failure, an error string describing why no target was
/// found.
- // TODO: Drop this in favor of the method accepting Triple.
+ // 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);
}
More information about the llvm-commits
mailing list