llvm-project
ef5d264e - [clang-sycl-linker] Remove dead and unnecessary check for no symbols image (#197596)

Commit
22 days ago
[clang-sycl-linker] Remove dead and unnecessary check for no symbols image (#197596) The `if (SI.Symbols.empty()) continue;` guard in `runSYCLLink` was unreachable: `collectEntryPoints` always calls `llvm::offloading::sycl::writeSymbolTable`, which emits at least a 4-byte `SymbolTableHeader` (`Count=0`) even when the input has no entry points. The check could never fire and was misleading suggesting that modules without kernels would be dropped. I checked other similar tools and did not find logic to filter out images, if there are no entry points. This doesn't look like responsibility of clang-sycl-linker. If this scenario is required, we can consider adding it later with a proper check. --------- Co-authored-by: Alexey Bader <alexey.bader@intel.com>
Author
Parents
Loading