[PATCH] D36311: [ThinLTO] Add GraphTraits for FunctionSummaries

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 16:07:52 PST 2018


eraman added inline comments.


================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:111
+  assert(A.Ref && B.Ref && "Need ValueInfo with non-null Ref to compare GUIDs");
   return A.getGUID() == B.getGUID();
 }
----------------
The current version of this file has a isSpecialKey(ValueInfo) in DenseMapInfo that compares a ValueInfo with tombstone and empty keys. This breaks with the == overload since the tombstone and empty keys don't have valid pointers and this tries dereferencing them.  A fix is to not use == in isSpecialKey but call getRef and compare the pointers. 


https://reviews.llvm.org/D36311





More information about the llvm-commits mailing list