zturner added a reviewer: lhames. zturner added inline comments.
================ Comment at: include/lldb/Utility/Status.h:108 + explicit Status(llvm::Error error); + explicit operator llvm::Error(); + ---------------- I think we should remove the conversion operator. Instead, why don't we make a class called `LLDBError` and then just have people say: ``` Status S = getSomeStatus(); return make_error<LLDBError>(S); ``` ================ Comment at: source/Utility/Status.cpp:81-88 +Status::operator llvm::Error() { + if (Success()) + return llvm::Error::success(); + if (m_type == ErrorType::eErrorTypePOSIX) + return llvm::errorCodeToError(std::error_code(m_code, std::generic_category())); + return llvm::make_error<llvm::StringError>(AsCString(), + llvm::inconvertibleErrorCode()); ---------------- Delete in favor of an `LLDBError` class as mentioned before. https://reviews.llvm.org/D33241 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits