[llvm] r232698 - llvm-cov: Try to appease a bot

Justin Bogner mail at justinbogner.com
Wed Mar 18 18:07:22 PDT 2015


Author: bogner
Date: Wed Mar 18 20:07:22 2015
New Revision: 232698

URL: http://llvm.org/viewvc/llvm-project?rev=232698&view=rev
Log:
llvm-cov: Try to appease a bot

The clang-hexagon elf bot was complaining that "Option 'color'
registered more than once!":

    http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24425

I don't understand why this error is happening, and I don't see it on
any other bots or on my own machine, so I'm kind of grasping at
straws. Try using an unscoped enum and specifying a cl::init to see if
they help.

Modified:
    llvm/trunk/tools/llvm-cov/CodeCoverage.cpp

Modified: llvm/trunk/tools/llvm-cov/CodeCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CodeCoverage.cpp?rev=232698&r1=232697&r2=232698&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CodeCoverage.cpp (original)
+++ llvm/trunk/tools/llvm-cov/CodeCoverage.cpp Wed Mar 18 20:07:22 2015
@@ -294,9 +294,9 @@ int CodeCoverageTool::run(Command Cmd, i
                "greater than the given threshold"),
       cl::cat(FilteringCategory));
 
-  enum class Colors { Auto, Always, Never };
+  enum Colors { Auto, Always, Never };
   cl::opt<Colors> Color(
-      "color", cl::desc("Configure color output:"),
+      "color", cl::desc("Configure color output:"), cl::init(Colors::Auto),
       cl::values(clEnumValN(Colors::Auto, "auto",
                             "Enable color if stdout seems to support it"),
                  clEnumValN(Colors::Always, "always", "Enable color"),





More information about the llvm-commits mailing list