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 {
21 // name of long option
23 // one of no_argument, required_argument, and optional_argument:
24 // whether option takes an argument
26 // if not NULL, set *flag to val when option found
28 // if flag not NULL, value to set *flag to; else return value
42 static void Prepare();
44 static void EnableError(bool error);
46 static int Parse(int argc, char * const argv [],
47 const char *optstring,
48 const Option *longopts, int *longindex);
50 static char* GetOptionArgument();
51 static int GetOptionIndex();
52 static int GetOptionErrorCause();
53 static std::string GetShortOptionString(struct option *long_options);
58 #endif // liblldb_OptionParser_h_