<div dir="ltr">Owen,<div><br></div><div>I apologize, I thought I had included enough information in the commit message by mentioning the specific test case that was causing the failure.  The test can be run directly from "unittests/Support/SupportTests"</div><div><br></div><div>On the second point, I didn't have the original commit email, so I could not directly reply to it.  Instead, I looped in the original committer after the fact, which was the best option I could see.</div><div><br></div><div>Richard<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 27, 2015 at 11:07 AM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Richard,<br>
<br>
Please don’t revert changes without explanation of what’s happening and how to reproduce it.  We don’t see see this failure happening on buildbots.  At the very least, a reply to the original commit email with a pointer to the failure would be polite.<br>
<br>
—Owen<br>
<br>
> On Jan 26, 2015, at 7:03 PM, Richard Trieu <<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>> wrote:<br>
><br>
> Author: rtrieu<br>
> Date: Mon Jan 26 21:03:47 2015<br>
> New Revision: 227167<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=227167&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=227167&view=rev</a><br>
> Log:<br>
> Revert r227148 & r227154 which added a test which infinitely loops.<br>
><br>
> r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly<br>
> outputs two following lines:<br>
><br>
> -tool: CommandLine Error: Option 'test-option-1' registered more than once!<br>
> -tool: CommandLine Error: Option 'test-option-2' registered more than once!<br>
><br>
> r227154 depends on changes from r227148<br>
><br>
> Modified:<br>
>    llvm/trunk/include/llvm/Support/CommandLine.h<br>
>    llvm/trunk/lib/Support/CommandLine.cpp<br>
>    llvm/trunk/unittests/Support/CommandLineTest.cpp<br>
><br>
> Modified: llvm/trunk/include/llvm/Support/CommandLine.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=227167&r1=227166&r2=227167&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=227167&r1=227166&r2=227167&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/Support/CommandLine.h (original)<br>
> +++ llvm/trunk/include/llvm/Support/CommandLine.h Mon Jan 26 21:03:47 2015<br>
> @@ -20,7 +20,6 @@<br>
> #ifndef LLVM_SUPPORT_COMMANDLINE_H<br>
> #define LLVM_SUPPORT_COMMANDLINE_H<br>
><br>
> -#include "llvm/ADT/ArrayRef.h"<br>
> #include "llvm/ADT/SmallVector.h"<br>
> #include "llvm/ADT/StringMap.h"<br>
> #include "llvm/ADT/Twine.h"<br>
> @@ -1939,7 +1938,7 @@ void HideUnrelatedOptions(cl::OptionCate<br>
> /// Some tools (like clang-format) like to be able to hide all options that are<br>
> /// not specific to the tool. This function allows a tool to specify a single<br>
> /// option category to display in the -help output.<br>
> -void HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories);<br>
> +void HideUnrelatedOptions(SmallVectorImpl<cl::OptionCategory *> &Categories);<br>
><br>
> } // End namespace cl<br>
><br>
><br>
> Modified: llvm/trunk/lib/Support/CommandLine.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=227167&r1=227166&r2=227167&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=227167&r1=227166&r2=227167&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Support/CommandLine.cpp (original)<br>
> +++ llvm/trunk/lib/Support/CommandLine.cpp Mon Jan 26 21:03:47 2015<br>
> @@ -1861,7 +1861,8 @@ void cl::HideUnrelatedOptions(cl::Option<br>
>   }<br>
> }<br>
><br>
> -void cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories) {<br>
> +void cl::HideUnrelatedOptions(<br>
> +    SmallVectorImpl<cl::OptionCategory *> &Categories) {<br>
>   auto CategoriesBegin = Categories.begin();<br>
>   auto CategoriesEnd = Categories.end();<br>
>   StringMap<cl::Option *> Options;<br>
><br>
> Modified: llvm/trunk/unittests/Support/CommandLineTest.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CommandLineTest.cpp?rev=227167&r1=227166&r2=227167&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CommandLineTest.cpp?rev=227167&r1=227166&r2=227167&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/unittests/Support/CommandLineTest.cpp (original)<br>
> +++ llvm/trunk/unittests/Support/CommandLineTest.cpp Mon Jan 26 21:03:47 2015<br>
> @@ -247,29 +247,4 @@ TEST(CommandLineTest, HideUnrelatedOptio<br>
>       << "Hid default option that should be visable.";<br>
> }<br>
><br>
> -cl::OptionCategory TestCategory2("Test Options set 2", "Description");<br>
> -<br>
> -TEST(CommandLineTest, HideUnrelatedOptionsMulti) {<br>
> -  cl::opt<int> TestOption1("test-option-1");<br>
> -  cl::opt<int> TestOption2("test-option-2", cl::cat(TestCategory));<br>
> -  cl::opt<int> TestOption3("test-option-3", cl::cat(TestCategory2));<br>
> -<br>
> -  const cl::OptionCategory *VisibleCategories[] = {&TestCategory,<br>
> -                                                   &TestCategory2};<br>
> -<br>
> -  cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories));<br>
> -<br>
> -  ASSERT_EQ(cl::ReallyHidden, TestOption1.getOptionHiddenFlag())<br>
> -      << "Failed to hide extra option.";<br>
> -  ASSERT_EQ(cl::NotHidden, TestOption2.getOptionHiddenFlag())<br>
> -      << "Hid extra option that should be visable.";<br>
> -  ASSERT_EQ(cl::NotHidden, TestOption3.getOptionHiddenFlag())<br>
> -      << "Hid extra option that should be visable.";<br>
> -<br>
> -  StringMap<cl::Option *> Map;<br>
> -  cl::getRegisteredOptions(Map);<br>
> -  ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag())<br>
> -      << "Hid default option that should be visable.";<br>
> -}<br>
> -<br>
> }  // anonymous namespace<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div><br></div></div></div>