llvm/lldb/source/Utility/Args.cpp

//===-- Args.cpp ----------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "lldb/Utility/Args.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
#include "llvm/ADT/StringSwitch.h"

usingnamespacelldb;
usingnamespacelldb_private;

// A helper function for argument parsing.
// Parses the initial part of the first argument using normal double quote
// rules: backslash escapes the double quote and itself. The parsed string is
// appended to the second argument. The function returns the unparsed portion
// of the string, starting at the closing quote.
static llvm::StringRef ParseDoubleQuotes(llvm::StringRef quoted,
                                         std::string &result) {}

static size_t ArgvToArgc(const char **argv) {}

// Trims all whitespace that can separate command line arguments from the left
// side of the string.
static llvm::StringRef ltrimForArgs(llvm::StringRef str) {}

// A helper function for SetCommandString. Parses a single argument from the
// command string, processing quotes and backslashes in a shell-like manner.
// The function returns a tuple consisting of the parsed argument, the quote
// char used, and the unparsed portion of the string starting at the first
// unqouted, unescaped whitespace character.
static std::tuple<std::string, char, llvm::StringRef>
ParseSingleArgument(llvm::StringRef command) {}

Args::ArgEntry::ArgEntry(llvm::StringRef str, char quote) :{}

// Args constructor
Args::Args(llvm::StringRef command) {}

Args::Args(const Args &rhs) {}

Args::Args(const StringList &list) :{}

Args::Args(llvm::ArrayRef<llvm::StringRef> args) :{}

Args &Args::operator=(const Args &rhs) {}

// Destructor
Args::~Args() = default;

void Args::Dump(Stream &s, const char *label_name) const {}

bool Args::GetCommandString(std::string &command) const {}

bool Args::GetQuotedCommandString(std::string &command) const {}

void Args::SetCommandString(llvm::StringRef command) {}

const char *Args::GetArgumentAtIndex(size_t idx) const {}

char **Args::GetArgumentVector() {}

const char **Args::GetConstArgumentVector() const {}

void Args::Shift() {}

void Args::Unshift(llvm::StringRef arg_str, char quote_char) {}

void Args::AppendArguments(const Args &rhs) {}

void Args::AppendArguments(const char **argv) {}

void Args::AppendArgument(llvm::StringRef arg_str, char quote_char) {}

void Args::InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str,
                                 char quote_char) {}

void Args::ReplaceArgumentAtIndex(size_t idx, llvm::StringRef arg_str,
                                  char quote_char) {}

void Args::DeleteArgumentAtIndex(size_t idx) {}

void Args::SetArguments(size_t argc, const char **argv) {}

void Args::SetArguments(const char **argv) {}

void Args::Clear() {}

std::string Args::GetShellSafeArgument(const FileSpec &shell,
                                       llvm::StringRef unsafe_arg) {}

lldb::Encoding Args::StringToEncoding(llvm::StringRef s,
                                      lldb::Encoding fail_value) {}

uint32_t Args::StringToGenericRegister(llvm::StringRef s) {}

void Args::EncodeEscapeSequences(const char *src, std::string &dst) {}

void Args::ExpandEscapedCharacters(const char *src, std::string &dst) {}

std::string Args::EscapeLLDBCommandArgument(const std::string &arg,
                                            char quote_char) {}

OptionsWithRaw::OptionsWithRaw(llvm::StringRef arg_string) {}

void OptionsWithRaw::SetFromString(llvm::StringRef arg_string) {}