From d485e885f04eaaafc9c0ce2555c6bd853b7c18a3 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Wed, 1 Apr 2009 00:15:46 +0000 Subject: [PATCH] * Fixed spelling of `invertible' * Simplified if statement git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68163 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CommandLine.h | 7 ++----- lib/Support/CommandLine.cpp | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 4a7c8c81196..e45ab217a42 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -537,7 +537,7 @@ struct basic_parser : public basic_parser_impl { // template<> class parser : public basic_parser { - bool IsInvertable; // Should we synthezise a -xno- style option? + bool IsInvertible; // Should we synthesize a -xno- style option? const char *ArgStr; public: void getExtraOptionNames(std::vector &OptionNames); @@ -547,10 +547,7 @@ public: template void initialize(Opt &O) { - if (O.getMiscFlags() & llvm::cl::AllowInverse) - IsInvertable = true; - else - IsInvertable = false; + IsInvertible = (O.getMiscFlags() & llvm::cl::AllowInverse); ArgStr = O.ArgStr; } diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index f3f198b355e..710b210ab99 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -872,13 +872,13 @@ 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) + if (IsInvertible && strncmp(ArgName+1, "no-", 3) == 0) Value = !Value; return false; } void parser::getExtraOptionNames(std::vector &OptionNames) { - if (!IsInvertable) + if (!IsInvertible) return; char *s = new char [strlen(ArgStr) + 3 + 1]; -- 2.34.1