1ac9a064cSDimitry Andric //===-- ErrorMessages.cpp -------------------------------------------------===// 2ac9a064cSDimitry Andric // 3ac9a064cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4ac9a064cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5ac9a064cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6ac9a064cSDimitry Andric // 7ac9a064cSDimitry Andric //===----------------------------------------------------------------------===// 8ac9a064cSDimitry Andric 9ac9a064cSDimitry Andric #include "lldb/Utility/ErrorMessages.h" 10ac9a064cSDimitry Andric #include "llvm/Support/ErrorHandling.h" 11ac9a064cSDimitry Andric 12ac9a064cSDimitry Andric namespace lldb_private { 13ac9a064cSDimitry Andric toString(lldb::ExpressionResults e)14ac9a064cSDimitry Andricstd::string toString(lldb::ExpressionResults e) { 15ac9a064cSDimitry Andric switch (e) { 16ac9a064cSDimitry Andric case lldb::eExpressionSetupError: 17ac9a064cSDimitry Andric return "expression setup error"; 18ac9a064cSDimitry Andric case lldb::eExpressionParseError: 19ac9a064cSDimitry Andric return "expression parse error"; 20ac9a064cSDimitry Andric case lldb::eExpressionResultUnavailable: 21ac9a064cSDimitry Andric return "expression error"; 22ac9a064cSDimitry Andric case lldb::eExpressionCompleted: 23ac9a064cSDimitry Andric return "expression completed successfully"; 24ac9a064cSDimitry Andric case lldb::eExpressionDiscarded: 25ac9a064cSDimitry Andric return "expression discarded"; 26ac9a064cSDimitry Andric case lldb::eExpressionInterrupted: 27ac9a064cSDimitry Andric return "expression interrupted"; 28ac9a064cSDimitry Andric case lldb::eExpressionHitBreakpoint: 29ac9a064cSDimitry Andric return "expression hit breakpoint"; 30ac9a064cSDimitry Andric case lldb::eExpressionTimedOut: 31ac9a064cSDimitry Andric return "expression timed out"; 32ac9a064cSDimitry Andric case lldb::eExpressionStoppedForDebug: 33ac9a064cSDimitry Andric return "expression stop at entry point for debugging"; 34ac9a064cSDimitry Andric case lldb::eExpressionThreadVanished: 35ac9a064cSDimitry Andric return "expression thread vanished"; 36ac9a064cSDimitry Andric } 37ac9a064cSDimitry Andric llvm_unreachable("unhandled enumerator"); 38ac9a064cSDimitry Andric } 39ac9a064cSDimitry Andric 40ac9a064cSDimitry Andric } // namespace lldb_private 41