diff options
Diffstat (limited to 'lldb/include')
| -rw-r--r-- | lldb/include/lldb/Interpreter/Args.h | 26 | ||||
| -rw-r--r-- | lldb/include/lldb/Interpreter/OptionArgParser.h | 43 | ||||
| -rw-r--r-- | lldb/include/lldb/Interpreter/Options.h | 1 |
3 files changed, 44 insertions, 26 deletions
diff --git a/lldb/include/lldb/Interpreter/Args.h b/lldb/include/lldb/Interpreter/Args.h index 33e1e0a873d..63eb7ff1321 100644 --- a/lldb/include/lldb/Interpreter/Args.h +++ b/lldb/include/lldb/Interpreter/Args.h @@ -12,7 +12,6 @@ // C Includes // C++ Includes -#include <list> #include <string> #include <utility> #include <vector> @@ -22,7 +21,6 @@ #include "llvm/ADT/StringRef.h" // Project includes #include "lldb/Utility/Environment.h" -#include "lldb/Utility/Status.h" #include "lldb/lldb-private-types.h" #include "lldb/lldb-types.h" @@ -343,30 +341,6 @@ public: return min <= sval64 && sval64 <= max; } - static lldb::addr_t StringToAddress(const ExecutionContext *exe_ctx, - llvm::StringRef s, - lldb::addr_t fail_value, Status *error); - - static bool StringToBoolean(llvm::StringRef s, bool fail_value, - bool *success_ptr); - - static char StringToChar(llvm::StringRef s, char fail_value, - bool *success_ptr); - - static int64_t StringToOptionEnum(llvm::StringRef s, - OptionEnumValueElement *enum_values, - int32_t fail_value, Status &error); - - static lldb::ScriptLanguage - StringToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value, - bool *success_ptr); - - // TODO: Use StringRef - static Status StringToFormat(const char *s, lldb::Format &format, - size_t *byte_size_ptr); // If non-NULL, then a - // byte size can precede - // the format character - static lldb::Encoding StringToEncoding(llvm::StringRef s, lldb::Encoding fail_value = lldb::eEncodingInvalid); diff --git a/lldb/include/lldb/Interpreter/OptionArgParser.h b/lldb/include/lldb/Interpreter/OptionArgParser.h new file mode 100644 index 00000000000..5ace7e5d025 --- /dev/null +++ b/lldb/include/lldb/Interpreter/OptionArgParser.h @@ -0,0 +1,43 @@ +//===-- OptionArgParser.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_INTERPRETER_OPTIONARGPARSER_H +#define LLDB_INTERPRETER_OPTIONARGPARSER_H + +#include "lldb/lldb-private-types.h" + +namespace lldb_private { + +struct OptionArgParser { + static lldb::addr_t ToAddress(const ExecutionContext *exe_ctx, + llvm::StringRef s, lldb::addr_t fail_value, + Status *error); + + static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr); + + static char ToChar(llvm::StringRef s, char fail_value, bool *success_ptr); + + static int64_t ToOptionEnum(llvm::StringRef s, + OptionEnumValueElement *enum_values, + int32_t fail_value, Status &error); + + static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s, + lldb::ScriptLanguage fail_value, + bool *success_ptr); + + // TODO: Use StringRef + static Status ToFormat(const char *s, lldb::Format &format, + size_t *byte_size_ptr); // If non-NULL, then a + // byte size can precede + // the format character +}; + +} // namespace lldb_private + +#endif // LLDB_INTERPRETER_OPTIONARGPARSER_H diff --git a/lldb/include/lldb/Interpreter/Options.h b/lldb/include/lldb/Interpreter/Options.h index 0ba999aaf56..6ccfb418582 100644 --- a/lldb/include/lldb/Interpreter/Options.h +++ b/lldb/include/lldb/Interpreter/Options.h @@ -18,6 +18,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Interpreter/Args.h" +#include "lldb/Utility/Status.h" #include "lldb/lldb-defines.h" #include "lldb/lldb-private.h" |

