[llvm] Fix assert for [CGData] Outlined Hash Tree #89792 (PR #98383)

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 14:11:15 PDT 2024


================
@@ -119,8 +119,8 @@ void OutlinedHashTreeRecord::convertToStableData(
       [&NodeIdMap](const HashNode *Current) {
         size_t Index = NodeIdMap.size();
         NodeIdMap[Current] = Index;
-        assert(Index = NodeIdMap.size() + 1 &&
-                       "Expected size of NodeMap to increment by 1");
+        assert(Index + 1 == NodeIdMap.size() &&
+               "Expected size of NodeMap to increment by 1");
----------------
kyulee-com wrote:

Thanks for the suggestion. I slightly changed the wordings for clarification.

https://github.com/llvm/llvm-project/pull/98383


More information about the llvm-commits mailing list