We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c612f79 commit 4a8f414Copy full SHA for 4a8f414
llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
@@ -178,11 +178,9 @@ struct AssumeBuilderState {
178
if (tryToPreserveWithoutAddingAssume(RK))
179
return;
180
MapKey Key{RK.WasOn, RK.AttrKind};
181
- auto Lookup = AssumedKnowledgeMap.find(Key);
182
- if (Lookup == AssumedKnowledgeMap.end()) {
183
- AssumedKnowledgeMap[Key] = RK.ArgValue;
+ auto [Lookup, Inserted] = AssumedKnowledgeMap.try_emplace(Key, RK.ArgValue);
+ if (Inserted)
184
185
- }
186
assert(((Lookup->second == 0 && RK.ArgValue == 0) ||
187
(Lookup->second != 0 && RK.ArgValue != 0)) &&
188
"inconsistent argument value");
0 commit comments