Elide unnecessary DenseMap copy.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2014-09-19 12:26:38 +00:00
parent c404e8208c
commit b845a6fe6d

View File

@ -246,7 +246,7 @@ class ELFObjectWriter : public MCObjectWriter {
/// \param NumRegularSections - Number of non-relocation sections. /// \param NumRegularSections - Number of non-relocation sections.
void computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout, void computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap, const SectionIndexMapTy &SectionIndexMap,
RevGroupMapTy RevGroupMap, const RevGroupMapTy &RevGroupMap,
unsigned NumRegularSections); unsigned NumRegularSections);
void ComputeIndexMap(MCAssembler &Asm, void ComputeIndexMap(MCAssembler &Asm,
@ -991,7 +991,7 @@ void ELFObjectWriter::ComputeIndexMap(MCAssembler &Asm,
void void
ELFObjectWriter::computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout, ELFObjectWriter::computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap, const SectionIndexMapTy &SectionIndexMap,
RevGroupMapTy RevGroupMap, const RevGroupMapTy &RevGroupMap,
unsigned NumRegularSections) { unsigned NumRegularSections) {
// FIXME: Is this the correct place to do this? // FIXME: Is this the correct place to do this?
// FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed? // FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed?
@ -1037,7 +1037,7 @@ ELFObjectWriter::computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
MSD.SectionIndex = ELF::SHN_COMMON; MSD.SectionIndex = ELF::SHN_COMMON;
} else if (BaseSymbol->isUndefined()) { } else if (BaseSymbol->isUndefined()) {
if (isSignature && !Used) if (isSignature && !Used)
MSD.SectionIndex = SectionIndexMap.lookup(RevGroupMap[&Symbol]); MSD.SectionIndex = SectionIndexMap.lookup(RevGroupMap.lookup(&Symbol));
else else
MSD.SectionIndex = ELF::SHN_UNDEF; MSD.SectionIndex = ELF::SHN_UNDEF;
if (!Used && WeakrefUsed) if (!Used && WeakrefUsed)