Add Status -- llvm::Error glue
authorPavel Labath <labath@google.com>
Thu, 18 May 2017 12:46:50 +0000 (12:46 +0000)
committerPavel Labath <labath@google.com>
Thu, 18 May 2017 12:46:50 +0000 (12:46 +0000)
commita24a3a30d00a43a5aa7e6cdf7b7046438735347c
treee089d3677f01492d54cd33c6c70ac632918e4753
parentebfdaf7394da63cc14ad6f13ef981bdaf4459db6
Add Status -- llvm::Error glue

Summary:
This adds functions to convert between llvm::Error and Status classes.
Posix errors in Status are represented as llvm::ECError, and the rest as
llvm::StringError.

For the conversion from Error to Status, ECError is again represented as
a posix error in Status, while other errors are stored as generic errors
and only the string value is preserved.

Reviewers: zturner, jingham

Subscribers: lldb-commits

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

llvm-svn: 303348
lldb/include/lldb/Utility/Status.h
lldb/source/Utility/Status.cpp
lldb/unittests/Utility/StatusTest.cpp