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

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 22:03:50 PDT 2024


Author: Kyungwoo Lee
Date: 2024-07-11T14:03:47+09:00
New Revision: d9d977f6e4177a241057d50e6edf74cad1bafa89

URL: https://github.com/llvm/llvm-project/commit/d9d977f6e4177a241057d50e6edf74cad1bafa89
DIFF: https://github.com/llvm/llvm-project/commit/d9d977f6e4177a241057d50e6edf74cad1bafa89.diff

LOG: Fix assert for [CGData] Outlined Hash Tree #89792 (#98383)

Added: 
    

Modified: 
    llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp b/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
index 996a57fd5e713..d3c6790408388 100644
--- a/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
+++ b/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
@@ -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()) &&
+               "Duplicate key in NodeIdMap: 'Current' should be unique.");
       },
       /*EdgeCallbackFn=*/nullptr, /*SortedWork=*/true);
 


        


More information about the llvm-commits mailing list