-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TableGen-based generator for command line arguments
Upstream moved away from manually declaring `*def` and `*inc` files. These are now auto-generated with tablegen. This patch does the same for cling, making it easier to rebase and maintain.
- Loading branch information
1 parent
c5692e7
commit c917ab5
Showing
5 changed files
with
37 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_directories(${LLVM_INCLUDE_DIRS}) | ||
|
||
set(LLVM_TARGET_DEFINITIONS ClingOptions.td) | ||
tablegen(LLVM ClingOptions.inc -gen-opt-parser-defs) | ||
add_public_tablegen_target(ClingDriverOptions) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//===--- ClingOptions.td - Options for cling -----------------------------------===// | ||
// | ||
// CLING - the C++ LLVM-based InterpreterG :) | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file defines the options accepted by cling. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// Include the common option parsing interfaces. | ||
include "llvm/Option/OptParser.td" | ||
|
||
#ifndef NDEBUG | ||
def _debugFlags_EQ : Joined<["--"], "debug-only=">; | ||
def _debugFlags : Flag<["--"], "debug-only">; | ||
#endif | ||
def _errorout : Flag<["--"], "errorout">, HelpText<"Do not recover from input errors">; | ||
// Re-implement to forward to our help | ||
def help : Flag<["-", "--"], "help">, HelpText<"Print this help text">; | ||
def L : JoinedOrSeparate<["-"], "L">, HelpText<"Add directory to library search path">, MetaVarName<"<directory>">; | ||
def l : JoinedOrSeparate<["-"], "l">, HelpText<"Load a library before prompt">, MetaVarName<"<library>">; | ||
def _metastr_EQ : Joined<["--"], "metastr=">, HelpText<"Set the meta command tag, default '.'">; | ||
def _metastr : Separate<["--"], "metastr">, HelpText<"Set the meta command tag, default '.'">; | ||
def _nologo : Flag<["--"], "nologo">, HelpText<"Do not show startup-banner">; | ||
def noruntime : Flag<["-", "--"], "noruntime">, HelpText<"Disable runtime support (no null checking, no value printing)">; | ||
def _ptrcheck : Flag<["--"], "ptrcheck">, HelpText<"Enable injection of pointer validity checks">; | ||
def version : Flag<["-", "--"], "version">, HelpText<"Print the compiler version">; | ||
def v : Flag<["-"], "v">, HelpText<"Enable verbose output">; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters