<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 7 Mar 2018, at 08:50, Daniel Sanders via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Thanks for letting me know. I can probably fix this by putting the LLVM_ENABLE_STATS logic in Statistic.h and changing the cmake option to LLVM_FORCE_ENABLE_STATS or similar. I'll look into this.</span><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">The Xcode build didn't reproduce it for me but I'm not convinced it actually ran the tests. It probably did run them but I can't see that in the IDE. I'm currently trying the command line version so I can see them run.</div></div></blockquote><div><br class=""></div>Yep, the IDE didn't run them. I can repro this on the Xcode build using a terminal.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On 7 Mar 2018, at 04:02, Greg Bedwell <<a href="mailto:gregbedwell@gmail.com" class="">gregbedwell@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Unfortunately, I think that this now breaks for multi-config generators (sadly, I don't think we have any public buildbots building using these).  I've tried it on Windows with cmake -G "Visual Studio 14 2015 Win64", but I'd guess the same thing would happen with cmake -G "Xcode".  If I build "Debug" I get a whole bunch of check-all failures along the lines of:</div><div class=""><br class=""></div><div class="">  # command stderr:</div><div class="">  C:\work\public-git\upstream-llvm\llvm\tools\clang\test\Analysis\stats.c:7:11: error: expected string not found in input</div><div class=""><br class=""></div><div class="">  // CHECK: ... Statistics Collected ...</div><div class=""><br class=""></div><div class="">            ^</div><div class=""><br class=""></div><div class="">  <stdin>:1:1: note: scanning from here</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The issue basically comes down to the fact that with a multi-config generator, it's not actually known at CMake time whether LLVM_ENABLE_ASSERTIONS is true or not, as the IDE will let the user decide whether to build Debug or Release from the already generated project at build time.  I assume this is why we had all those checks on NDEBUG at the same time as LLVM_ENABLE_STATS previously.</div></div></div></blockquote><div class=""><br class=""></div>That could be the reason, but I don't think many people consider multi-config generators until they accidentally break them :-). I think they were there because the code pre-dates our use of cmake and nobody thought about porting -DLLVM_ENABLE_STATS when we switched from autoconf to cmake.<br class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">-Greg</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 5 March 2018 at 19:38, Daniel Sanders via llvm-commits<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Author: dsanders<br class="">Date: Mon Mar  5 11:38:16 2018<br class="">New Revision: 326738<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=326738&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=326738&view=rev</a><br class="">Log:<br class="">Re-commit: Make STATISTIC() values available programmatically<br class=""><br class="">Summary:<br class="">It can be useful for tools to be able to retrieve the values of variables<br class="">declared via STATISTIC() directly without having to emit them and parse<br class="">them back. Use cases include:<br class="">* Needing to report specific statistics to a test harness<br class="">* Wanting to post-process statistics. For example, to produce a percentage of<br class="">  functions that were fully selected by GlobalISel<br class=""><br class="">Make this possible by adding llvm::GetStatistics() which returns an<br class="">iterator_range that can be used to inspect the statistics that have been<br class="">touched during execution. When statistics are disabled (NDEBUG and not<br class="">LLVM_ENABLE_STATISTICS) this method will return an empty range.<br class=""><br class="">This patch doesn't address the effect of multiple compilations within the same<br class="">process. In such situations, the statistics will be cumulative for all<br class="">compilations up to the GetStatistics() call.<br class=""><br class="">Reviewers: qcolombet, rtereshin, aditya_nandakumar, bogner<br class=""><br class="">Reviewed By: rtereshin, bogner<br class=""><br class="">Subscribers: llvm-commits, mgorny<br class=""><br class="">Differential Revision:<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D43901" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/<wbr class="">D43901</a><br class=""><br class="">This re-commit fixes a missing include of <vector> which it seems clang didn't<br class="">mind but G++ and MSVC objected to. It seems that, clang was ok with std::vector<br class="">only being forward declared at the point of use since it was fully defined<br class="">eventually but G++/MSVC both rejected it at the point of use.<br class=""><br class="">Added:<br class="">    llvm/trunk/unittests/ADT/<wbr class="">StatisticTest.cpp<br class="">      - copied unchanged from r326725, llvm/trunk/unittests/ADT/<wbr class="">StatisticTest.cpp<br class="">Modified:<br class="">    llvm/trunk/cmake/modules/<wbr class="">HandleLLVMOptions.cmake<br class="">    llvm/trunk/include/llvm/ADT/<wbr class="">Statistic.h<br class="">    llvm/trunk/include/llvm/<wbr class="">Config/llvm-config.h.cmake<br class="">    llvm/trunk/lib/Support/<wbr class="">Statistic.cpp<br class="">    llvm/trunk/unittests/ADT/<wbr class="">CMakeLists.txt<br class=""></blockquote></div></div></div></div></blockquote></div><br class=""></div></div></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">llvm-commits mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:llvm-commits@lists.llvm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">llvm-commits@lists.llvm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></div></blockquote></div><br class=""></body></html>