[llvm] 937e506 - [IPO] Simplify code with DenseMap::operator[] (NFC) (#115261)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 10:55:09 PST 2024
Author: Kazu Hirata
Date: 2024-11-07T10:55:05-08:00
New Revision: 937e5069a740837ea3cb466df8e75a53f6d48254
URL: https://github.com/llvm/llvm-project/commit/937e5069a740837ea3cb466df8e75a53f6d48254
DIFF: https://github.com/llvm/llvm-project/commit/937e5069a740837ea3cb466df8e75a53f6d48254.diff
LOG: [IPO] Simplify code with DenseMap::operator[] (NFC) (#115261)
Added:
Modified:
llvm/lib/Transforms/IPO/Internalize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index 0b8fde6489f8e7..4cdd1fa6110627 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -176,7 +176,7 @@ void InternalizePass::checkComdat(
if (!C)
return;
- ComdatInfo &Info = ComdatMap.try_emplace(C).first->second;
+ ComdatInfo &Info = ComdatMap[C];
++Info.Size;
if (shouldPreserveGV(GV))
Info.External = true;
More information about the llvm-commits
mailing list