Skip to content

Commit 871e32b

Browse files
[AsmPrinter] Avoid repeated hash lookups (NFC) (#110376)
1 parent deda2f0 commit 871e32b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,10 +3406,8 @@ void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) {
34063406
OS.emitInt32(getCompleteTypeIndex(DIGV->getType()).getIndex());
34073407
OS.AddComment("DataOffset");
34083408

3409-
uint64_t Offset = 0;
3410-
if (CVGlobalVariableOffsets.contains(DIGV))
3411-
// Use the offset seen while collecting info on globals.
3412-
Offset = CVGlobalVariableOffsets[DIGV];
3409+
// Use the offset seen while collecting info on globals.
3410+
uint64_t Offset = CVGlobalVariableOffsets.lookup(DIGV);
34133411
OS.emitCOFFSecRel32(GVSym, Offset);
34143412

34153413
OS.AddComment("Segment");

0 commit comments

Comments
 (0)