Skip to content

Commit d76519c

Browse files
svenvhsys-ce-bb
authored andcommitted
Fix error propagation in parseSPIRV (#3362)
d54f77c5 ("[NFC] Split of SPT and SPIR-V in header parsing (#2316)", 2024-03-11) made a copy of the error log, with the presumably unintended consequence that errors are no longer propagated back to the SPIRVModule itself. Original commit: KhronosGroup/SPIRV-LLVM-Translator@3d58c69cf2f3704
1 parent b9db548 commit d76519c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ std::istream &SPIRVModuleImpl::parseSPIRV(std::istream &I) {
25882588
SPIRVWord Header[5] = {0};
25892589
I.read(reinterpret_cast<char *>(&Header), sizeof(Header));
25902590

2591-
SPIRVErrorLog ErrorLog = MI.getErrorLog();
2591+
SPIRVErrorLog &ErrorLog = MI.getErrorLog();
25922592
if (!ErrorLog.checkError(!I.eof(), SPIRVEC_InvalidModule,
25932593
"input file is empty") ||
25942594
!ErrorLog.checkError(!I.fail(), SPIRVEC_InvalidModule,

0 commit comments

Comments
 (0)