blob: e28d884581fa3a2f120a1ddc7f15173c45359037 [file] [log] [blame]
Greg Clayton67cc0632012-08-22 17:17:09 +00001//===-- OptionValueArgs.cpp -------------------------------------*- 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#include "lldb/Interpreter/OptionValueArgs.h"
11
12// C Includes
13// C++ Includes
14// Other libraries and framework includes
15// Project includes
16#include "lldb/Interpreter/Args.h"
17
18using namespace lldb;
19using namespace lldb_private;
20
21size_t
22OptionValueArgs::GetArgs (Args &args)
23{
24 const uint32_t size = m_values.size();
25 std::vector<const char *> argv;
26 for (uint32_t i = 0; i<size; ++i)
27 {
28 const char *string_value = m_values[i]->GetStringValue ();
29 if (string_value)
30 argv.push_back(string_value);
31 }
32
33 if (argv.empty())
34 args.Clear();
35 else
36 args.SetArguments(argv.size(), &argv[0]);
37 return args.GetArgumentCount();
38}