mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 17:43:35 +03:00
Add new cmdline option -checkaction=<D|C|halt>
This commit is contained in:
parent
d4e680bcdb
commit
2d539fa63d
2 changed files with 17 additions and 1 deletions
|
@ -368,6 +368,18 @@ static cl::opt<MultiSetter, true, FlagParser<bool>>
|
|||
contracts("contracts", cl::ZeroOrMore, cl::location(ContractsSetter),
|
||||
cl::desc("(*) Enable function pre- and post-conditions"));
|
||||
|
||||
static cl::opt<CHECKACTION, true> checkAction(
|
||||
"checkaction", cl::ZeroOrMore, cl::location(global.params.checkAction),
|
||||
cl::desc("Action to take when an assert/boundscheck/final-switch fails"),
|
||||
cl::init(CHECKACTION_D),
|
||||
clEnumValues(
|
||||
clEnumValN(CHECKACTION_D, "D",
|
||||
"Throw an unrecoverable Error (default)"),
|
||||
clEnumValN(CHECKACTION_C, "C",
|
||||
"Call the C runtime library assert failure function"),
|
||||
clEnumValN(CHECKACTION_halt, "halt",
|
||||
"Execute a halt instruction, terminating the program")));
|
||||
|
||||
CHECKENABLE invReleaseMode = CHECKENABLEon;
|
||||
static MultiSetter ReleaseSetter(true, &invReleaseMode,
|
||||
&global.params.useInvariants,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue