llvm
7438dab0 - Make the error handling kind selectable through TranslatorOpts (#3941)

Commit
9 days ago
Make the error handling kind selectable through TranslatorOpts (#3941) Declares the error handling kind in the public `LLVMSPIRVOpts.h` and carries it on `TranslatorOpts`, so an embedder can select the non fatal behaviour without redeclaring library internals. The default stays `Exit`, so nothing changes for callers that do not ask. Two further fixes were needed to make `Ignore` usable: `parseSPT()` held the error log by value, so `getError()` lost the reason, and `Ignore` wrote to stderr unconditionally. `llvm-spirv` gains `--spirv-error-handling`, which the new test uses. Validated on the `llvm_release_220` branch against LLVM 22.1.0, where the test fails before the change and passes after, with the rest of the suite unaffected (1017 passed, 0 unexpected failures). The patch applies to `main` with identical added and removed lines. Fixes #3939 Original commit: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/1e5eb1f97d5a1bb
Author
Committer
Parents
Loading