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);