Skip to content

Commit 4ed3855

Browse files
committed
IRGen: Address llvm::TargetRegistry::lookupTarget deprecation
See llvm/llvm-project#162188.
1 parent d1227fb commit 4ed3855

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/IRGen/IRGen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,7 @@ swift::createTargetMachine(const IRGenOptions &Opts, ASTContext &Ctx,
11451145
}
11461146

11471147
std::string Error;
1148-
const Target *Target =
1149-
TargetRegistry::lookupTarget(EffectiveTriple.str(), Error);
1148+
const Target *Target = TargetRegistry::lookupTarget(EffectiveTriple, Error);
11501149
if (!Target) {
11511150
Ctx.Diags.diagnose(SourceLoc(), diag::no_llvm_target, EffectiveTriple.str(),
11521151
Error);

0 commit comments

Comments
 (0)