diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-02-16 20:13:02 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-02-16 20:13:02 +0000 |
commit | b60736ec1405bb0a8dd40989f67ef4c93da068ab (patch) | |
tree | 5c43fbb7c9fc45f0f87e0e6795a86267dbd12f9d /llvm/lib/Support/Error.cpp | |
parent | cfca06d7963fa0909f90483b42a6d7d194d01e08 (diff) |
Diffstat (limited to 'llvm/lib/Support/Error.cpp')
-rw-r--r-- | llvm/lib/Support/Error.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Error.cpp b/llvm/lib/Support/Error.cpp index 315a11e967d1..e7ab4387dfd1 100644 --- a/llvm/lib/Support/Error.cpp +++ b/llvm/lib/Support/Error.cpp @@ -168,3 +168,7 @@ void LLVMDisposeErrorMessage(char *ErrMsg) { delete[] ErrMsg; } LLVMErrorTypeId LLVMGetStringErrorTypeId() { return reinterpret_cast<void *>(&StringError::ID); } + +LLVMErrorRef LLVMCreateStringError(const char *ErrMsg) { + return wrap(make_error<StringError>(ErrMsg, inconvertibleErrorCode())); +} |