Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Follow recent changes in the OptTable.
LLVM 5.0 introduces a field to describe possible allowed option values. This
aids the auto completion machanisms.
  • Loading branch information
vgvassilev committed Oct 21, 2017
commit 91d6550e94e643a33229d66bd8864ec2e34266f3
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace clingoptions {
OPT_INVALID = 0, // This is not an option ID.
#define PREFIX(NAME, VALUE)
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR) OPT_##ID,
HELPTEXT, METAVAR, VALUES) OPT_##ID,
#include "cling/Interpreter/ClingOptions.inc"
LastOption
#undef OPTION
Expand Down
24 changes: 12 additions & 12 deletions interpreter/cling/include/cling/Interpreter/ClingOptions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ PREFIX(prefix_2, {"--" COMMA 0})
#error "Define OPTION prior to including this file!"
#endif

OPTION(prefix_0, "<input>", INPUT, Input, INVALID, INVALID, 0, 0, 0, 0, 0)
OPTION(prefix_0, "<unknown>", UNKNOWN, Unknown, INVALID, INVALID, 0, 0, 0, 0, 0)
OPTION(prefix_0, "<input>", INPUT, Input, INVALID, INVALID, 0, 0, 0, 0, 0, 0)
OPTION(prefix_0, "<unknown>", UNKNOWN, Unknown, INVALID, INVALID, 0, 0, 0, 0, 0, 0)
OPTION(prefix_2, "errorout", _errorout, Flag, INVALID, INVALID, 0, 0, 0,
"Do not recover from input errors", 0)
"Do not recover from input errors", 0, 0)
OPTION(prefix_3, "help", help, Flag, INVALID, INVALID, 0, 0, 0,
"Print this help text", 0)
"Print this help text", 0, 0)
OPTION(prefix_1, "L", L, JoinedOrSeparate, INVALID, INVALID, 0, 0, 0,
"Add directory to library search path", "<directory>")
"Add directory to library search path", "<directory>", 0)
// Re-implement to forward to our help
OPTION(prefix_1, "l", l, JoinedOrSeparate, INVALID, INVALID, 0, 0, 0,
"Load a library before prompt", "<library>")
"Load a library before prompt", "<library>", 0)
OPTION(prefix_2, "metastr=", _metastr_EQ, Joined, INVALID, INVALID, 0, 0, 0,
"Set the meta command tag, default '.'", 0)
"Set the meta command tag, default '.'", 0, 0)
OPTION(prefix_2, "metastr", _metastr, Separate, INVALID, INVALID, 0, 0, 0,
"Set the meta command tag, default '.'", 0)
"Set the meta command tag, default '.'", 0, 0)
OPTION(prefix_2, "nologo", _nologo, Flag, INVALID, INVALID, 0, 0, 0,
"Do not show startup-banner", 0)
"Do not show startup-banner", 0, 0)
OPTION(prefix_3, "noruntime", noruntime, Flag, INVALID, INVALID, 0, 0, 0,
"Disable runtime support (no null checking, no value printing)", 0)
"Disable runtime support (no null checking, no value printing)", 0, 0)
OPTION(prefix_3, "version", version, Flag, INVALID, INVALID, 0, 0, 0,
"Print the compiler version", 0)
"Print the compiler version", 0, 0)
OPTION(prefix_1, "v", v, Flag, INVALID, INVALID, 0, 0, 0,
"Enable verbose output", 0)
"Enable verbose output", 0, 0)
6 changes: 3 additions & 3 deletions interpreter/cling/lib/Interpreter/InvocationOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ static const char kNoStdInc[] = "-nostdinc";

#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR)
HELPTEXT, METAVAR, VALUES)
#include "cling/Interpreter/ClingOptions.inc"
#undef OPTION
#undef PREFIX

static const OptTable::Info ClingInfoTable[] = {
#define PREFIX(NAME, VALUE)
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR) \
HELPTEXT, METAVAR, VALUES) \
{ PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS, VALUES },
#include "cling/Interpreter/ClingOptions.inc"
#undef OPTION
#undef PREFIX
Expand Down