Skip to content

Commit b96be2b

Browse files
committed
Fix error propagation in parseSPIRV (#3362)
d54f77c ("[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.
1 parent e6b1c64 commit b96be2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SPIRV/libSPIRV/SPIRVModule.cpp

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

2540-
SPIRVErrorLog ErrorLog = MI.getErrorLog();
2540+
SPIRVErrorLog &ErrorLog = MI.getErrorLog();
25412541
if (!ErrorLog.checkError(!I.eof(), SPIRVEC_InvalidModule,
25422542
"input file is empty") ||
25432543
!ErrorLog.checkError(!I.fail(), SPIRVEC_InvalidModule,

0 commit comments

Comments
 (0)