Skip to content

Commit b529394

Browse files
apply code review suggestions
1 parent 51425ea commit b529394

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ bool runSpirvBackend(Module *M, std::string &Result, std::string &ErrMsg,
9191
return SPIRVTranslateModule(M, Result, ErrMsg, AllowExtNames, Opts);
9292
}
9393

94-
bool runSpirvBackend(Module *M, std::ostream *OS, std::string &ErrMsg,
94+
bool runSpirvBackend(Module *M, std::ostream &OS, std::string &ErrMsg,
9595
const SPIRV::TranslatorOpts &TranslatorOpts) {
9696
std::string Result;
9797
bool Status = runSpirvBackend(M, Result, ErrMsg, TranslatorOpts);
98-
if (Status && OS)
99-
*OS << Result;
98+
if (Status)
99+
OS << Result;
100100
return Status;
101101
}
102102

@@ -161,7 +161,7 @@ std::string translateLLVMIRToSPIRV(llvm::Module &module) {
161161
if (const char *EnvIsBackend = std::getenv("TRITON_USE_SPIRV_BACKEND"))
162162
llvm::StringRef(EnvIsBackend).getAsInteger(10, SpvTranslateMode);
163163
auto success = SpvTranslateMode
164-
? llvm::runSpirvBackend(&module, &OS, Err, SPIRVOpts)
164+
? llvm::runSpirvBackend(&module, OS, Err, SPIRVOpts)
165165
: llvm::writeSpirv(&module, SPIRVOpts, OS, Err);
166166
#else
167167
auto success = llvm::writeSpirv(&module, SPIRVOpts, OS, Err);

0 commit comments

Comments
 (0)