llvm.org GIT mirror llvm / 8c1abc4
[Support] Fix comments for handleAllErrors: it calls llvm_unreachable if the contract is violated, not report_fatal_error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326413 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 2 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
881881 return handleErrorImpl(std::move(Payload), std::forward(Hs)...);
882882 }
883883
884 /// Behaves the same as handleErrors, except that it requires that all
885 /// errors be handled by the given handlers. If any unhandled error remains
886 /// after the handlers have run, report_fatal_error() will be called.
884 /// Behaves the same as handleErrors, except that by contract all errors
885 /// *must* be handled by the given handlers (i.e. there must be no remaining
886 /// errors after running the handlers, or llvm_unreachable is called).
887887 template
888888 void handleAllErrors(Error E, HandlerTs &&... Handlers) {
889889 cantFail(handleErrors(std::move(E), std::forward(Handlers)...));
890890 }
891891
892892 /// Check that E is a non-error, then drop it.
893 /// If E is an error report_fatal_error will be called.
893 /// If E is an error, llvm_unreachable will be called.
894894 inline void handleAllErrors(Error E) {
895895 cantFail(std::move(E));
896896 }