3 Commits

Author SHA1 Message Date
Lang Hames
c7013cd325 Add a comment to clarify the contract for LLVMGetErrorMessage in the c-bindings
for Error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343394 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-29 23:49:54 +00:00
Lang Hames
e61aa61731 [ORC] Update ORC C bindings to use the new llvm::Error C API.
This replaces instances of the LLVMOrcErrorCode type with LLVMErrorRef,
simplifying the implementation of the OrcCBindingsStack class and ORC
C API bindings and making it possible to return arbitrary (wrapped)
llvm::Errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342828 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-23 02:09:18 +00:00
Lang Hames
e0dc5c1ea2 [Support] Add a basic C API for llvm::Error.
Summary:
The C-API supports consuming errors, converting an error to a string error
message, and querying an error's type. Other LLVM C APIs that wish to use
llvm::Error can supply error-type-id checkers and custom
error-to-structured-type converters for any custom errors they provide.

Reviewers: bogner, zturner, labath, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D50716

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339802 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 18:42:11 +00:00