static T unwrap(llvm::Expected<T> value) { if (value) return std::move(value.get()); std::cerr << "swift-reflection-test error: " << toString(value.takeError()) << "\n"; exit(EXIT_FAILURE); }
error_or<T> of_llvm_error_or(llvm::Expected<T> &e) { if (!e) { return failure(llvm::toString(e.takeError())); } return success(e.get()); }