[PATCH] D19556: [ThinLTO] Emit individual index files for distributed backends

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 10:41:43 PDT 2016


tejohnson added inline comments.

================
Comment at: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp:363
@@ +362,3 @@
+      } else {
+        ++IndexGVSummariesIter;
+        if (IndexGVSummariesIter == IndexSummariesIter->second.end() &&
----------------
joker.eph wrote:
> Here we don't check for the same conditions as in the ctor.
(Copying from IRC for posterity)

This was also my first instinct, until I realized that operator++ should never be executed here.

It's coming from the "for (const auto &I : *this)" on line 291 for an empty index. The == end() check should be done before attempting to do the operator++. Confirmed with a normal llvm-lto build that it detects it is at the end and exits (operator++ is never entered for the test case). So something else is going wrong. Attempting to build an msan compiler to track this down better.


Repository:
  rL LLVM

http://reviews.llvm.org/D19556





More information about the llvm-commits mailing list