1//===- llvm/Support/Unix/system_error.inc - Unix error_code ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file provides the Unix specific implementation of the error_code 11// and error_condition classes. 12// 13//===----------------------------------------------------------------------===// 14 15//===----------------------------------------------------------------------===// 16//=== WARNING: Implementation here must contain only generic UNIX code that 17//=== is guaranteed to work on *all* UNIX variants. 18//===----------------------------------------------------------------------===// 19 20using namespace llvm; 21 22std::string 23_system_error_category::message(int ev) const { 24 return _do_message::message(ev); 25} 26 27error_condition 28_system_error_category::default_error_condition(int ev) const { 29#ifdef ELAST 30 if (ev > ELAST) 31 return error_condition(ev, system_category()); 32#endif // ELAST 33 return error_condition(ev, generic_category()); 34} 35