LLDB
mainline
src
llvm
tools
lldb
include
lldb
Host
OptionParser.h
Go to the documentation of this file.
1
//===-- OptionParser.h ------------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef liblldb_OptionParser_h_
10
#define liblldb_OptionParser_h_
11
12
#include <mutex>
13
#include <string>
14
15
#include "llvm/ADT/StringRef.h"
16
17
struct
option;
18
19
namespace
lldb_private
{
20
21
struct
OptionDefinition;
22
23
struct
Option
{
24
// The definition of the option that this refers to.
25
const
OptionDefinition *
definition
;
26
// if not NULL, set *flag to val when option found
27
int
*
flag
;
28
// if flag not NULL, value to set *flag to; else return value
29
int
val
;
30
};
31
32
class
OptionParser
{
33
public
:
34
enum
OptionArgument
{ eNoArgument = 0, eRequiredArgument, eOptionalArgument };
35
36
static
void
Prepare(std::unique_lock<std::mutex> &lock);
37
38
static
void
EnableError(
bool
error);
39
40
static
int
Parse
(
int
argc,
char
*
const
argv[], llvm::StringRef optstring,
41
const
Option
*longopts,
int
*longindex);
42
43
static
char
*GetOptionArgument();
44
static
int
GetOptionIndex();
45
static
int
GetOptionErrorCause();
46
static
std::string GetShortOptionString(
struct
option *long_options);
47
};
48
}
49
50
#endif // liblldb_OptionParser_h_
lldb_private
Enumerations for broadcasting.
Definition:
SBLaunchInfo.h:14
lldb_private::Option::flag
int * flag
Definition:
OptionParser.h:27
lldb_private::postfix::Parse
Node * Parse(llvm::StringRef expr, llvm::BumpPtrAllocator &alloc)
Parse the given postfix expression.
Definition:
PostfixExpression.cpp:44
lldb_private::Option
Definition:
OptionParser.h:23
lldb_private::Option::definition
const OptionDefinition * definition
Definition:
OptionParser.h:25
lldb_private::Option::val
int val
Definition:
OptionParser.h:29
lldb_private::OptionParser
Definition:
OptionParser.h:32
lldb_private::OptionParser::OptionArgument
OptionArgument
Definition:
OptionParser.h:34
Generated on Mon Nov 4 2019 00:56:51 for LLDB by
1.8.13