[all-commits] [llvm/llvm-project] 0fb0ac: [OMPIRBuilder] Simplify error handling while emitt...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Tue Jan 14 08:09:00 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0fb0ac708a581e795c78b7838e10305d80a25c67
https://github.com/llvm/llvm-project/commit/0fb0ac708a581e795c78b7838e10305d80a25c67
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-01-14 (Tue, 14 Jan 2025)
Changed paths:
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Log Message:
-----------
[OMPIRBuilder] Simplify error handling while emitting target calls, NFC (#122477)
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list