From b9439bab20e258afd4a8dc2eb41641446cd26124 Mon Sep 17 00:00:00 2001 From: Petr Kurapov Date: Tue, 15 Apr 2025 10:27:19 +0000 Subject: [PATCH] Fix the setTargetTriple API usage in SPIRV translation --- third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp b/third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp index 8bf21fdd2f..1b49ad0017 100644 --- a/third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp +++ b/third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp @@ -55,7 +55,7 @@ bool runSpirvBackend(Module *M, std::string &Result, std::string &ErrMsg, ? Triple::spirv64 : Triple::spirv32, TargetTriple.getSubArch()); - M->setTargetTriple(TargetTriple.str()); + M->setTargetTriple(TargetTriple); // We need to reset Data Layout to conform with the TargetMachine M->setDataLayout(""); } @@ -64,7 +64,7 @@ bool runSpirvBackend(Module *M, std::string &Result, std::string &ErrMsg, if (TranslatorOpts.getMaxVersion() != VersionNumber::MaximumVersion) { TargetTriple.setArch(TargetTriple.getArch(), spirvVersionToSubArch(TranslatorOpts.getMaxVersion())); - M->setTargetTriple(TargetTriple.str()); + M->setTargetTriple(TargetTriple); } // Translate the Module into SPIR-V