Skip to content

Commit

Permalink
ELFObjectWriter: Use DenseMap+SmallVector. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jul 1, 2024
1 parent dce1828 commit 8e8c455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/MC/ELFObjectWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm) {
RevGroupMapTy RevGroupMap;
SectionIndexMapTy SectionIndexMap;

std::map<const MCSymbol *, std::vector<const MCSectionELF *>> GroupMembers;
DenseMap<const MCSymbol *, SmallVector<const MCSectionELF *, 0>> GroupMembers;

// Write out the ELF header ...
writeHeader(Asm);
Expand Down Expand Up @@ -1111,7 +1111,7 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm) {
Group->setAlignment(Align(4));
Groups.push_back(Group);
}
std::vector<const MCSectionELF *> &Members =
SmallVector<const MCSectionELF *, 0> &Members =
GroupMembers[SignatureSymbol];
Members.push_back(&Section);
if (RelSection)
Expand Down

0 comments on commit 8e8c455

Please sign in to comment.