mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 14:40:40 +03:00
Add command-line option -transition=safe
Also fix `ldmd2 -transition=?` regression and don't display an error message when invoking LDMD without command-line args.
This commit is contained in:
parent
0e71a760ae
commit
cecb040ff0
3 changed files with 24 additions and 14 deletions
|
@ -178,16 +178,18 @@ void processVersions(std::vector<std::string> &list, const char *type,
|
|||
void processTransitions(std::vector<std::string> &list) {
|
||||
for (const auto &i : list) {
|
||||
if (i == "?") {
|
||||
printf("Language changes listed by -transition=id:\n");
|
||||
printf(" = all list information on all language changes\n");
|
||||
printf(" = checkimports give deprecation messages about 10378 "
|
||||
"anomalies\n");
|
||||
printf(
|
||||
" = complex,14488 list all usages of complex or imaginary types\n");
|
||||
printf(" = field,3449 list all non - mutable fields which occupy an "
|
||||
"object instance\n");
|
||||
printf(" = import,10378 revert to single phase name lookup\n");
|
||||
printf(" = tls list all variables going into thread local "
|
||||
printf("\n"
|
||||
"Language changes listed by -transition=id:\n"
|
||||
" =all list information on all language changes\n"
|
||||
" =checkimports give deprecation messages about 10378 "
|
||||
"anomalies\n"
|
||||
" =complex,14488 list all usages of complex or imaginary types\n"
|
||||
" =field,3449 list all non-mutable fields which occupy an "
|
||||
"object instance\n"
|
||||
" =import,10378 revert to single phase name lookup\n"
|
||||
" =safe shows places with hidden change in semantics "
|
||||
"needed for better @safe guarantees\n"
|
||||
" =tls list all variables going into thread local "
|
||||
"storage\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
} else if (i == "all") {
|
||||
|
@ -204,6 +206,8 @@ void processTransitions(std::vector<std::string> &list) {
|
|||
global.params.vfield = true;
|
||||
} else if (i == "import" || i == "10378") {
|
||||
global.params.bug10378 = true;
|
||||
} else if (i == "safe") {
|
||||
global.params.vsafe = true;
|
||||
} else if (i == "tls") {
|
||||
global.params.vtls = true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue