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 bd9e31e commit e49c8d5Copy full SHA for e49c8d5
llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
@@ -268,10 +268,9 @@ class LVStringRecords {
268
269
void add(TypeIndex TI, StringRef String) {
270
static uint32_t Index = 0;
271
- if (Strings.find(TI) == Strings.end())
272
- Strings.emplace(
273
- std::piecewise_construct, std::forward_as_tuple(TI),
274
- std::forward_as_tuple(++Index, std::string(String), nullptr));
+ auto [It, Inserted] = Strings.try_emplace(TI);
+ if (Inserted)
+ It->second = std::make_tuple(++Index, std::string(String), nullptr);
275
}
276
277
StringRef find(TypeIndex TI) {
0 commit comments