Changeset 6d45949 in OpenModelica


Ignore:
Timestamp:
2021-01-19T17:44:30+01:00 (3 years ago)
Author:
perost <perost86@…>
Branches:
Added-citation-metadata, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, master, omlib-staging
Children:
03da1b5
Parents:
f1f813af
git-author:
Per Östlund <perost86@…> (01/19/21 16:36:26)
git-committer:
perost <perost86@…> (01/19/21 17:44:30)
Message:

Fix unparsing of disabled debug flag

  • Prefix debug flags in FlagsUtil.unparseFlags with "no" if they're disabled.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/Util/FlagsUtil.mo

    rf5ad9af3 r6d45949  
    18621862  String name;
    18631863  list<String> strl = {};
     1864  Boolean fvalue;
    18641865algorithm
    18651866  try
     
    18811882
    18821883  for f in allDebugFlags loop
    1883     if f.default <> debug_flags[f.index] then
    1884       strl := f.name :: strl;
     1884    fvalue := debug_flags[f.index];
     1885    if f.default <> fvalue then
     1886      name := if fvalue then f.name else "no" + f.name;
     1887      strl := name :: strl;
    18851888    end if;
    18861889  end for;
  • testsuite/openmodelica/interactive-API/getCommandLineOptions.mos

    r221b299 r6d45949  
    1717setCommandLineOptions("--postOptModules=dumpDAE,dumpDAEXML");
    1818getCommandLineOptions();
     19setCommandLineOptions("-d=-newInst");
     20getCommandLineOptions();
    1921
    2022// Result:
     
    2931// true
    3032// {"-d=ceval,failtrace","--postOptModules=dumpDAE,dumpDAEXML","--showAnnotations=true"}
     33// true
     34// {"-d=nonewInst,ceval,failtrace","--postOptModules=dumpDAE,dumpDAEXML","--showAnnotations=true"}
    3135// endResult
Note: See TracChangeset for help on using the changeset viewer.