[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 13:46:01 PDT 2024


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

None

>From e23f47571229b631b84b3aeae3e3cacfd42e1431 Mon Sep 17 00:00:00 2001
From: Kyungwoo Lee <kyulee at meta.com>
Date: Wed, 10 Jul 2024 13:41:59 -0700
Subject: [PATCH] Fix assert for [CGData] Outlined Hash Tree #89792

---
 llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp b/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
index 996a57fd5e713..473d69e011e9a 100644
--- a/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
+++ b/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
@@ -119,7 +119,7 @@ void OutlinedHashTreeRecord::convertToStableData(
       [&NodeIdMap](const HashNode *Current) {
         size_t Index = NodeIdMap.size();
         NodeIdMap[Current] = Index;
-        assert(Index = NodeIdMap.size() + 1 &&
+        assert(Index + 1 == NodeIdMap.size() &&
                        "Expected size of NodeMap to increment by 1");
       },
       /*EdgeCallbackFn=*/nullptr, /*SortedWork=*/true);



More information about the llvm-commits mailing list