[llvm-commits] [llvm] r77892 - in /llvm/trunk: docs/CommandLine.html include/llvm/Support/CommandLine.h lib/Support/CommandLine.cpp

Benjamin Kramer benny.kra at googlemail.com
Sun Aug 2 05:13:02 PDT 2009


Author: d0k
Date: Sun Aug  2 07:13:02 2009
New Revision: 77892

URL: http://llvm.org/viewvc/llvm-project?rev=77892&view=rev
Log:
Remove duplicated colons and spaces.

Modified:
    llvm/trunk/docs/CommandLine.html
    llvm/trunk/include/llvm/Support/CommandLine.h
    llvm/trunk/lib/Support/CommandLine.cpp

Modified: llvm/trunk/docs/CommandLine.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandLine.html?rev=77892&r1=77891&r2=77892&view=diff

==============================================================================
--- llvm/trunk/docs/CommandLine.html (original)
+++ llvm/trunk/docs/CommandLine.html Sun Aug  2 07:13:02 2009
@@ -1883,7 +1883,7 @@
 
     default:
       <i>// Print an error message if unrecognized character!</i>
-      <b>return</b> O.error(": '" + Arg + "' value invalid for file size argument!");
+      <b>return</b> O.error("'" + Arg + "' value invalid for file size argument!");
     }
   }
 }

Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=77892&r1=77891&r2=77892&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Sun Aug  2 07:13:02 2009
@@ -473,7 +473,7 @@
         return false;
       }
 
-    return O.error(": Cannot find option named '" + ArgVal + "'!");
+    return O.error("Cannot find option named '" + ArgVal + "'!");
   }
 
   /// addLiteralOption - Add an entry to the mapping table.
@@ -770,7 +770,7 @@
 
   bool setLocation(Option &O, DataType &L) {
     if (Location)
-      return O.error(": cl::location(x) specified more than once!");
+      return O.error("cl::location(x) specified more than once!");
     Location = &L;
     return false;
   }
@@ -964,7 +964,7 @@
 
   bool setLocation(Option &O, StorageClass &L) {
     if (Location)
-      return O.error(": cl::location(x) specified more than once!");
+      return O.error("cl::location(x) specified more than once!");
     Location = &L;
     return false;
   }
@@ -1139,7 +1139,7 @@
 
   bool setLocation(Option &O, unsigned &L) {
     if (Location)
-      return O.error(": cl::location(x) specified more than once!");
+      return O.error("cl::location(x) specified more than once!");
     Location = &L;
     return false;
   }
@@ -1317,15 +1317,15 @@
 
   void done() {
     if (!hasArgStr())
-      error(": cl::alias must have argument name specified!");
+      error("cl::alias must have argument name specified!");
     if (AliasFor == 0)
-      error(": cl::alias must have an cl::aliasopt(option) specified!");
+      error("cl::alias must have an cl::aliasopt(option) specified!");
       addArgument();
   }
 public:
   void setAliasFor(Option &O) {
     if (AliasFor)
-      error(": cl::alias must only have one cl::aliasopt(...) specified!");
+      error("cl::alias must only have one cl::aliasopt(...) specified!");
     AliasFor = &O;
   }
 

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=77892&r1=77891&r2=77892&view=diff

==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Sun Aug  2 07:13:02 2009
@@ -187,17 +187,17 @@
       if (i+1 < argc) {     // Steal the next argument, like for '-o filename'
         Value = argv[++i];
       } else {
-        return Handler->error(" requires a value!");
+        return Handler->error("requires a value!");
       }
     }
     break;
   case ValueDisallowed:
     if (NumAdditionalVals > 0)
-      return Handler->error(": multi-valued option specified"
+      return Handler->error("multi-valued option specified"
       " with ValueDisallowed modifier!");
 
     if (Value)
-      return Handler->error(" does not allow a value! '" +
+      return Handler->error("does not allow a value! '" +
                             std::string(Value) + "' specified.");
     break;
   case ValueOptional:
@@ -229,7 +229,7 @@
       if (i+1 < argc) {
         Value = argv[++i];
       } else {
-        return Handler->error(": not enough values!");
+        return Handler->error("not enough values!");
       }
       if (Handler->addOccurrence(i, ArgName, Value, MultiArg))
         return true;
@@ -470,7 +470,7 @@
         // unless there is only one positional argument...
         if (PositionalOpts.size() > 2)
           ErrorParsing |=
-            Opt->error(" error - this positional option will never be matched, "
+            Opt->error("error - this positional option will never be matched, "
                        "because it does not Require a value, and a "
                        "cl::ConsumeAfter option is active!");
       } else if (UnboundedFound && !Opt->ArgStr[0]) {
@@ -478,7 +478,7 @@
         // not specified after an option that eats all extra arguments, or this
         // one will never get any!
         //
-        ErrorParsing |= Opt->error(" error - option can never match, because "
+        ErrorParsing |= Opt->error("error - option can never match, because "
                                    "another positional argument will match an "
                                    "unbounded number of values, and this option"
                                    " does not require a value!");
@@ -737,7 +737,7 @@
     case Required:
     case OneOrMore:
       if (I->second->getNumOccurrences() == 0) {
-        I->second->error(" must be specified at least once!");
+        I->second->error("must be specified at least once!");
         ErrorParsing = true;
       }
       // Fall through
@@ -788,16 +788,16 @@
   switch (getNumOccurrencesFlag()) {
   case Optional:
     if (NumOccurrences > 1)
-      return error(": may only occur zero or one times!", ArgName);
+      return error("may only occur zero or one times!", ArgName);
     break;
   case Required:
     if (NumOccurrences > 1)
-      return error(": must occur exactly one time!", ArgName);
+      return error("must occur exactly one time!", ArgName);
     // Fall through
   case OneOrMore:
   case ZeroOrMore:
   case ConsumeAfter: break;
-  default: return error(": bad num occurrences flag value!");
+  default: return error("bad num occurrences flag value!");
   }
 
   return handleOccurrence(pos, ArgName, Value);
@@ -873,7 +873,7 @@
   } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
     Value = false;
   } else {
-    return O.error(": '" + Arg +
+    return O.error("'" + Arg +
                    "' is invalid value for boolean argument! Try 0 or 1");
   }
   return false;
@@ -890,7 +890,7 @@
              || Arg == "False" || Arg == "0") {
     Value = BOU_FALSE;
   } else {
-    return O.error(": '" + Arg +
+    return O.error("'" + Arg +
                    "' is invalid value for boolean argument! Try 0 or 1");
   }
   return false;
@@ -903,7 +903,7 @@
   char *End;
   Value = (int)strtol(Arg.c_str(), &End, 0);
   if (*End != 0)
-    return O.error(": '" + Arg + "' value invalid for integer argument!");
+    return O.error("'" + Arg + "' value invalid for integer argument!");
   return false;
 }
 
@@ -918,7 +918,7 @@
   if (((V == ULONG_MAX) && (errno == ERANGE))
       || (*End != 0)
       || (Value != V))
-    return O.error(": '" + Arg + "' value invalid for uint argument!");
+    return O.error("'" + Arg + "' value invalid for uint argument!");
   return false;
 }
 
@@ -929,7 +929,7 @@
   char *End;
   Value = strtod(ArgStart, &End);
   if (*End != 0)
-    return O.error(": '" +Arg+ "' value invalid for floating point argument!");
+    return O.error("'" + Arg + "' value invalid for floating point argument!");
   return false;
 }
 





More information about the llvm-commits mailing list