diff --git a/lld/ELF/Arch/ARM.cpp b/lld/ELF/Arch/ARM.cpp index 7a7348c04a88..2219d2d6ce0c 100644 --- a/lld/ELF/Arch/ARM.cpp +++ b/lld/ELF/Arch/ARM.cpp @@ -1103,10 +1103,11 @@ static void toLittleEndianInstructions(uint8_t *buf, uint64_t start, // [$t, non $t) and convert these to little endian a word or half word at a // time respectively. void elf::convertArmInstructionstoBE8(InputSection *sec, uint8_t *buf) { - if (!sectionMap.contains(sec)) + auto it = sectionMap.find(sec); + if (it == sectionMap.end()) return; - SmallVector &mapSyms = sectionMap[sec]; + SmallVector &mapSyms = it->second; if (mapSyms.empty()) return;