Skip to content

Commit 3d58c69

Browse files
authored
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 b0c1b9b commit 3d58c69

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
@@ -2599,7 +2599,7 @@ std::istream &SPIRVModuleImpl::parseSPIRV(std::istream &I) {
25992599
SPIRVWord Header[5] = {0};
26002600
I.read(reinterpret_cast<char *>(&Header), sizeof(Header));
26012601

2602-
SPIRVErrorLog ErrorLog = MI.getErrorLog();
2602+
SPIRVErrorLog &ErrorLog = MI.getErrorLog();
26032603
if (!ErrorLog.checkError(!I.eof(), SPIRVEC_InvalidModule,
26042604
"input file is empty") ||
26052605
!ErrorLog.checkError(!I.fail(), SPIRVEC_InvalidModule,

0 commit comments

Comments
 (0)