[TargetRegistry] Accept Triple in createTargetMachine() (NFC) (#130940)

This avoids doing a Triple -> std::string -> Triple round trip in lots
of places, now that the Module stores a Triple.
This commit is contained in:
Nikita Popov
2025-03-12 17:35:09 +01:00
committed by GitHub
parent 71582c6667
commit f137c3d592
62 changed files with 134 additions and 120 deletions

View File

@@ -143,7 +143,7 @@ void dumpFunction(const BinaryFunction &BF) {
std::move(MCEInstance.MCE), std::move(MAB)));
AsmStreamer->initSections(true, *BC.STI);
std::unique_ptr<TargetMachine> TM(BC.TheTarget->createTargetMachine(
BC.TripleName, "", "", TargetOptions(), std::nullopt));
*BC.TheTriple, "", "", TargetOptions(), std::nullopt));
std::unique_ptr<AsmPrinter> MAP(
BC.TheTarget->createAsmPrinter(*TM, std::move(AsmStreamer)));