1 //===-- OptionParser.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_OptionParser_h_
11 #define liblldb_OptionParser_h_
17 namespace lldb_private {
19 struct OptionDefinition;
23 // The definition of the option that this refers to.
24 const OptionDefinition *definition;
25 // if not NULL, set *flag to val when option found
27 // if flag not NULL, value to set *flag to; else return value
41 static void Prepare();
43 static void EnableError(bool error);
45 static int Parse(int argc, char * const argv [],
46 const char *optstring,
47 const Option *longopts, int *longindex);
49 static char* GetOptionArgument();
50 static int GetOptionIndex();
51 static int GetOptionErrorCause();
52 static std::string GetShortOptionString(struct option *long_options);
57 #endif // liblldb_OptionParser_h_