X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FCommandLine.cpp;h=2c56e0ffb87eb0fc5e12c06d1f924466a06fd56d;hb=2ec0dbf9616e91952c90ad1c7f7404d9d1ee053c;hp=8cd483a25e5de7bfd49f8c5780f5837cdef20780;hpb=1421b7bc23f39e57052a51f4647512936f45b12f;p=oota-llvm.git diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 8cd483a25e5..2c56e0ffb87 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -396,7 +396,12 @@ static void ExpandResponseFiles(int argc, char** argv, // If we could open the file, parse its contents, otherwise // pass the @file option verbatim. - // TODO: support recursion. + + // TODO: we should also support recursive loading of response files, + // since this is how gcc behaves. (From their man page: "The file may + // itself contain additional @file options; any such options will be + // processed recursively.") + if (respFilePtr != 0) { ParseCStringVector(newArgv, respFilePtr->getBufferStart()); continue; @@ -867,6 +872,8 @@ bool parser::parse(Option &O, const char *ArgName, return O.error(": '" + Arg + "' is invalid value for boolean argument! Try 0 or 1"); } + if (IsInvertable && strncmp(ArgName+1, "no-", 3) == 0) + Value = !Value; return false; } @@ -877,7 +884,8 @@ bool parser::parse(Option &O, const char *ArgName, if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" || Arg == "1") { Value = BOU_TRUE; - } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") { + } else if (Arg == "false" || Arg == "FALSE" + || Arg == "False" || Arg == "0") { Value = BOU_FALSE; } else { return O.error(": '" + Arg +