summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-08-23 18:06:42 +0000
committeremaste <emaste@FreeBSD.org>2013-08-23 18:06:42 +0000
commit424d4dadd208e2a1e9a43c3d55f47f03ba0c4509 (patch)
tree05d762b98a499804ce690e6ce04033f1ddf4dee6 /contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp
parentcde487f27a84e02a560384f75178fddca68740f6 (diff)
parentdcd15f81789e389c1cb27d264fcdddfd0a6002bd (diff)
downloadFreeBSD-src-424d4dadd208e2a1e9a43c3d55f47f03ba0c4509.zip
FreeBSD-src-424d4dadd208e2a1e9a43c3d55f47f03ba0c4509.tar.gz
Merge lldb r188801 to contrib/llvm/tools/lldb/
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp b/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp
new file mode 100644
index 0000000..ee96239
--- /dev/null
+++ b/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp
@@ -0,0 +1,58 @@
+//===-- OptionGroupString.cpp ----------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Interpreter/OptionGroupString.h"
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+
+using namespace lldb;
+using namespace lldb_private;
+
+OptionGroupString::OptionGroupString (uint32_t usage_mask,
+ bool required,
+ const char *long_option,
+ int short_option,
+ uint32_t completion_type,
+ lldb::CommandArgumentType argument_type,
+ const char *usage_text,
+ const char *default_value) :
+ m_value (default_value, default_value)
+{
+ m_option_definition.usage_mask = usage_mask;
+ m_option_definition.required = required;
+ m_option_definition.long_option = long_option;
+ m_option_definition.short_option = short_option;
+ m_option_definition.option_has_arg = required_argument;
+ m_option_definition.enum_values = NULL;
+ m_option_definition.completion_type = completion_type;
+ m_option_definition.argument_type = argument_type;
+ m_option_definition.usage_text = usage_text;
+}
+
+OptionGroupString::~OptionGroupString ()
+{
+}
+
+Error
+OptionGroupString::SetOptionValue (CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_arg)
+{
+ Error error (m_value.SetValueFromCString (option_arg));
+ return error;
+}
+
+void
+OptionGroupString::OptionParsingStarting (CommandInterpreter &interpreter)
+{
+ m_value.Clear();
+}
OpenPOWER on IntegriCloud