Skip to content

Commit cc127f0

Browse files
[TargetRegistry] Remove deprecated createTargetMachine (#161053)
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.
1 parent 9dcfebf commit cc127f0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

llvm/include/llvm/MC/TargetRegistry.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ class Target {
389389
/// @name Feature Constructors
390390
/// @{
391391

392+
// TODO(boomanaiden154): Remove this function after LLVM 22 branches.
392393
[[deprecated("Use overload accepting Triple instead")]]
393394
MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple,
394395
const MCTargetOptions &Options) const {
@@ -440,6 +441,7 @@ class Target {
440441
return MCInstrAnalysisCtorFn(Info);
441442
}
442443

444+
// TODO(boomanaiden154): Remove this function after LLVM 22 branches.
443445
[[deprecated("Use overload accepting Triple instead")]]
444446
MCRegisterInfo *createMCRegInfo(StringRef TT) const {
445447
if (!MCRegInfoCtorFn)
@@ -454,6 +456,7 @@ class Target {
454456
return MCRegInfoCtorFn(TT);
455457
}
456458

459+
// TODO(boomanaiden154): Remove this function after LLVM 22 branches.
457460
[[deprecated("Use overload accepting Triple instead")]]
458461
MCSubtargetInfo *createMCSubtargetInfo(StringRef TheTriple, StringRef CPU,
459462
StringRef Features) const {
@@ -496,16 +499,6 @@ class Target {
496499
JIT);
497500
}
498501

499-
[[deprecated("Use overload accepting Triple instead")]]
500-
TargetMachine *createTargetMachine(
501-
StringRef TT, StringRef CPU, StringRef Features,
502-
const TargetOptions &Options, std::optional<Reloc::Model> RM,
503-
std::optional<CodeModel::Model> CM = std::nullopt,
504-
CodeGenOptLevel OL = CodeGenOptLevel::Default, bool JIT = false) const {
505-
return createTargetMachine(Triple(TT), CPU, Features, Options, RM, CM, OL,
506-
JIT);
507-
}
508-
509502
/// createMCAsmBackend - Create a target specific assembly parser.
510503
MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI,
511504
const MCRegisterInfo &MRI,
@@ -599,6 +592,7 @@ class Target {
599592
return nullptr;
600593
}
601594

595+
// TODO(boomanaiden154): Remove this function after LLVM 22 branches.
602596
[[deprecated("Use overload accepting Triple instead")]]
603597
MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
604598
return createMCRelocationInfo(Triple(TT), Ctx);
@@ -616,6 +610,7 @@ class Target {
616610
return Fn(TT, Ctx);
617611
}
618612

613+
// TODO(boomanaiden154): Remove this function after LLVM 22 branches.
619614
[[deprecated("Use overload accepting Triple instead")]]
620615
MCSymbolizer *
621616
createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,

0 commit comments

Comments
 (0)