[llvm] r218122 - Elide unnecessary DenseMap copy.
Benjamin Kramer
benny.kra at googlemail.com
Fri Sep 19 05:26:38 PDT 2014
Author: d0k
Date: Fri Sep 19 07:26:38 2014
New Revision: 218122
URL: http://llvm.org/viewvc/llvm-project?rev=218122&view=rev
Log:
Elide unnecessary DenseMap copy.
No functionality change.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=218122&r1=218121&r2=218122&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Fri Sep 19 07:26:38 2014
@@ -246,7 +246,7 @@ class ELFObjectWriter : public MCObjectW
/// \param NumRegularSections - Number of non-relocation sections.
void computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap,
- RevGroupMapTy RevGroupMap,
+ const RevGroupMapTy &RevGroupMap,
unsigned NumRegularSections);
void ComputeIndexMap(MCAssembler &Asm,
@@ -991,7 +991,7 @@ void ELFObjectWriter::ComputeIndexMap(MC
void
ELFObjectWriter::computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap,
- RevGroupMapTy RevGroupMap,
+ const RevGroupMapTy &RevGroupMap,
unsigned NumRegularSections) {
// FIXME: Is this the correct place to do this?
// FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed?
@@ -1037,7 +1037,7 @@ ELFObjectWriter::computeSymbolTable(MCAs
MSD.SectionIndex = ELF::SHN_COMMON;
} else if (BaseSymbol->isUndefined()) {
if (isSignature && !Used)
- MSD.SectionIndex = SectionIndexMap.lookup(RevGroupMap[&Symbol]);
+ MSD.SectionIndex = SectionIndexMap.lookup(RevGroupMap.lookup(&Symbol));
else
MSD.SectionIndex = ELF::SHN_UNDEF;
if (!Used && WeakrefUsed)
More information about the llvm-commits
mailing list