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 21f1ef3 commit 8c2714eCopy full SHA for 8c2714e
llvm/lib/ExecutionEngine/Orc/Debugging/DebugInfoSupport.cpp
@@ -33,10 +33,9 @@ static DenseSet<StringRef> DWARFSectionNames = {
33
static void preserveDWARFSection(LinkGraph &G, Section &Sec) {
34
DenseMap<Block *, Symbol *> Preserved;
35
for (auto Sym : Sec.symbols()) {
36
- if (Sym->isLive())
37
- Preserved[&Sym->getBlock()] = Sym;
38
- else if (!Preserved.count(&Sym->getBlock()))
39
+ auto [It, Inserted] = Preserved.try_emplace(&Sym->getBlock());
+ if (Inserted || Sym->isLive())
+ It->second = Sym;
40
}
41
for (auto Block : Sec.blocks()) {
42
auto &PSym = Preserved[Block];
0 commit comments