Fixed '-debug' and '-version' handling in LDMD.

No idea how the old version once passed the test suite.
This commit is contained in:
David Nadlinger
2012-09-07 03:51:32 +02:00
parent 6fea7358dc
commit c941640d17
+5 -3
View File
@@ -593,7 +593,8 @@ Params parseArgs(int originalArgc, char** originalArgv, ls::Path ldcPath)
goto Lerror; goto Lerror;
result.debugLevel = (int)level; result.debugLevel = (int)level;
} }
result.debugIdentifiers.push_back(p + 7); else
result.debugIdentifiers.push_back(p + 7);
} }
else if (p[6]) else if (p[6])
goto Lerror; goto Lerror;
@@ -616,7 +617,8 @@ Params parseArgs(int originalArgc, char** originalArgv, ls::Path ldcPath)
goto Lerror; goto Lerror;
result.versionLevel = (int)level; result.versionLevel = (int)level;
} }
result.versionIdentifiers.push_back(p + 9); else
result.versionIdentifiers.push_back(p + 9);
} }
else else
goto Lerror; goto Lerror;
@@ -769,7 +771,7 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
if (p.debugFlag) r.push_back("-d-debug"); if (p.debugFlag) r.push_back("-d-debug");
if (p.debugLevel) r.push_back(concat("-d-debug=", p.debugLevel)); if (p.debugLevel) r.push_back(concat("-d-debug=", p.debugLevel));
pushSwitches("-d-debug=", p.debugIdentifiers, r); pushSwitches("-d-debug=", p.debugIdentifiers, r);
if (p.debugLevel) r.push_back(concat("-d-version=", p.versionLevel)); if (p.versionLevel) r.push_back(concat("-d-version=", p.versionLevel));
pushSwitches("-d-version=", p.versionIdentifiers, r); pushSwitches("-d-version=", p.versionIdentifiers, r);
pushSwitches("-L=", p.linkerSwitches, r); pushSwitches("-L=", p.linkerSwitches, r);
if (p.defaultLibName) r.push_back(concat("-defaultlib=", p.defaultLibName)); if (p.defaultLibName) r.push_back(concat("-defaultlib=", p.defaultLibName));