Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@ static Error createError(const Twine &Reason, llvm::Error E) {
/// SymInfo contains information about symbol: it's address
/// and section index which is -1LL for absolute symbols.
struct SymInfo {
uint64_t Address;
uint64_t SectionIndex;
uint64_t Address = 0;
uint64_t SectionIndex = 0;
};

/// Returns the address of symbol relocation used against and a section index.
Expand All @@ -1921,7 +1921,7 @@ static Expected<SymInfo> getSymbolInfo(const object::ObjectFile &Obj,
// in the object file
if (Sym != Obj.symbol_end()) {
bool New;
std::tie(CacheIt, New) = Cache.insert({*Sym, {0, 0}});
std::tie(CacheIt, New) = Cache.try_emplace(*Sym);
if (!New)
return CacheIt->second;

Expand Down