From c941640d1773def8ea33aed12cf3830eb471adf6 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 31 Aug 2012 23:31:29 +0200 Subject: [PATCH] Fixed '-debug' and '-version' handling in LDMD. No idea how the old version once passed the test suite. --- driver/ldmd.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/driver/ldmd.cpp b/driver/ldmd.cpp index 1a8f6687..32bb9bbf 100644 --- a/driver/ldmd.cpp +++ b/driver/ldmd.cpp @@ -593,7 +593,8 @@ Params parseArgs(int originalArgc, char** originalArgv, ls::Path ldcPath) goto Lerror; result.debugLevel = (int)level; } - result.debugIdentifiers.push_back(p + 7); + else + result.debugIdentifiers.push_back(p + 7); } else if (p[6]) goto Lerror; @@ -616,7 +617,8 @@ Params parseArgs(int originalArgc, char** originalArgv, ls::Path ldcPath) goto Lerror; result.versionLevel = (int)level; } - result.versionIdentifiers.push_back(p + 9); + else + result.versionIdentifiers.push_back(p + 9); } else goto Lerror; @@ -769,7 +771,7 @@ void buildCommandLine(std::vector& r, const Params& p) if (p.debugFlag) r.push_back("-d-debug"); if (p.debugLevel) r.push_back(concat("-d-debug=", p.debugLevel)); 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("-L=", p.linkerSwitches, r); if (p.defaultLibName) r.push_back(concat("-defaultlib=", p.defaultLibName));