diff options
Diffstat (limited to 'llvm/unittests')
| -rw-r--r-- | llvm/unittests/Support/ErrorTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp index 788dcd3c8b8..1807547572b 100644 --- a/llvm/unittests/Support/ErrorTest.cpp +++ b/llvm/unittests/Support/ErrorTest.cpp @@ -9,6 +9,7 @@ #include "llvm/Support/Error.h" #include "llvm/Support/Errc.h" +#include "llvm/Support/ErrorHandling.h" #include "gtest/gtest.h" #include <memory> @@ -30,6 +31,10 @@ public: OS << "CustomError { " << getInfo() << "}"; } + std::error_code convertToErrorCode() const override { + llvm_unreachable("CustomError doesn't support ECError conversion"); + } + protected: // This error is subclassed below, but we can't use inheriting constructors // yet, so we can't propagate the constructors through ErrorInfo. Instead @@ -57,6 +62,10 @@ public: OS << "CustomSubError { " << getInfo() << ", " << getExtraInfo() << "}"; } + std::error_code convertToErrorCode() const override { + llvm_unreachable("CustomSubError doesn't support ECError conversion"); + } + protected: int ExtraInfo; }; |

