[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:51:19 PDT 2024
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/98383
>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 1/2] 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);
>From 92258c583f65b90bb11e9f557bed0f18bcac4e60 Mon Sep 17 00:00:00 2001
From: Kyungwoo Lee <kyulee at meta.com>
Date: Wed, 10 Jul 2024 13:50:37 -0700
Subject: [PATCH 2/2] fix format
---
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 473d69e011e9a..72911f5da396e 100644
--- a/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
+++ b/llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp
@@ -120,7 +120,7 @@ void OutlinedHashTreeRecord::convertToStableData(
size_t Index = NodeIdMap.size();
NodeIdMap[Current] = Index;
assert(Index + 1 == NodeIdMap.size() &&
- "Expected size of NodeMap to increment by 1");
+ "Expected size of NodeMap to increment by 1");
},
/*EdgeCallbackFn=*/nullptr, /*SortedWork=*/true);
More information about the llvm-commits
mailing list