20 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
21 assert(!reported &&
"attempting to report a diagnostic more than once");
24 if (!diagnostics.empty()) {
25 for (
auto &&diagnostic : diagnostics) {
26 diagnostic.getLocation().getContext()->getDiagEngine().emit(
27 std::move(diagnostic));
LogicalResult checkAndReport()
Converts all kinds of failure into a LogicalResult failure, emitting the diagnostic if necessary.
Include the generated interface declarations.
LogicalResult failure(bool isFailure=true)
Utility function to generate a LogicalResult.
This class represents an efficient way to signal success or failure.