[llvm] [TargetRegistry] Remove deprecated createTargetMachine (PR #161053)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 4 12:14:47 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-mc
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.
---
Full diff: https://github.com/llvm/llvm-project/pull/161053.diff
1 Files Affected:
- (modified) llvm/include/llvm/MC/TargetRegistry.h (+5-10)
``````````diff
diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index 019ee602975f7..570d4c0e8d272 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -389,6 +389,7 @@ class Target {
/// @name Feature Constructors
/// @{
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple,
const MCTargetOptions &Options) const {
@@ -440,6 +441,7 @@ class Target {
return MCInstrAnalysisCtorFn(Info);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRegisterInfo *createMCRegInfo(StringRef TT) const {
if (!MCRegInfoCtorFn)
@@ -454,6 +456,7 @@ class Target {
return MCRegInfoCtorFn(TT);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSubtargetInfo *createMCSubtargetInfo(StringRef TheTriple, StringRef CPU,
StringRef Features) const {
@@ -496,16 +499,6 @@ class Target {
JIT);
}
- [[deprecated("Use overload accepting Triple instead")]]
- TargetMachine *createTargetMachine(
- StringRef TT, StringRef CPU, StringRef Features,
- const TargetOptions &Options, std::optional<Reloc::Model> RM,
- std::optional<CodeModel::Model> CM = std::nullopt,
- CodeGenOptLevel OL = CodeGenOptLevel::Default, bool JIT = false) const {
- return createTargetMachine(Triple(TT), CPU, Features, Options, RM, CM, OL,
- JIT);
- }
-
/// createMCAsmBackend - Create a target specific assembly parser.
MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI,
const MCRegisterInfo &MRI,
@@ -599,6 +592,7 @@ class Target {
return nullptr;
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
return createMCRelocationInfo(Triple(TT), Ctx);
@@ -616,6 +610,7 @@ class Target {
return Fn(TT, Ctx);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSymbolizer *
createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
``````````
</details>
https://github.com/llvm/llvm-project/pull/161053
More information about the llvm-commits
mailing list