Skip to content

Commit

Permalink
Propagate error message from SPIRVModule import
Browse files Browse the repository at this point in the history
Reading a SPIR-V module may not succeed, so propagate the error
message back to the caller through ErrMsg.
  • Loading branch information
svenvh committed Apr 26, 2019
1 parent 7bfcb69 commit 967e8fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/SPIRV/SPIRVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,7 @@ bool llvm::readSpirv(LLVMContext &C, std::istream &IS, Module *&M,

IS >> *BM;
if (!BM->isModuleValid()) {
BM->getError(ErrMsg);
M = nullptr;
return false;
}
Expand Down

0 comments on commit 967e8fa

Please sign in to comment.