-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OMPIRBuilder] Simplify error handling while emitting target calls, NFC
The OMPIRBuilder uses `llvm::Error`s to allow callbacks passed to it to signal errors and prevent OMPIRBuilder functions to continue after one has been triggered. This means that OMPIRBuilder functions taking callbacks needs to be able to forward these errors, which must always be checked. However, in cases where these functions are called from within the OMPIRBuilder with callbacks also defined inside of it, it can be known in advance that no errors will be produced. This is the case of those defined in `emitTargetCall`. This patch introduces calls to the `cantFail` function instead of the previous superfluous checks that still assumed calls wouldn't fail, making these assumptions more obvious and simplifying their implementation.
- Loading branch information
Showing
1 changed file
with
17 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters