llvm
f49271da - [SYCL][NFC] Refactor sycl-post-link for better error handling and code simplicity (#21579)

Commit
3 days ago
[SYCL][NFC] Refactor sycl-post-link for better error handling and code simplicity (#21579) This commit improves error handling and simplifies code in sycl-post-link without changing functionality: **Error handling improvements:** - Convert functions to return Error instead of void - Propagate errors up to the stack to comply with LLVM guidelines - Introduce ExitOnError pattern for consistent error handling - Replace error() and checkError() calls with ExitOnErr() for cleaner flow **Code refactoring:** - Refactor simple utility functions reusing LLVM functionality **Code simplification:** - Remove unnecessary includes - Simplify SmallVector declarations by removing MAX_COLUMNS_IN_FILE_TABLE constant and using default template parameter These changes prepare the code for extraction to a library component while improving maintainability and following LLVM error handling conventions. All refactored functions maintain the same functionality but with proper error propagation.
Author
Parents
Loading