summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-09-19 12:26:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-09-19 12:26:38 +0000
commit04f9da8f217f0a4790904970b97b0d5410e98cf3 (patch)
tree2ce80fb6fcb294645f0215184af12c2b3632b7a9 /llvm/lib/MC/ELFObjectWriter.cpp
parentc1953dc63e1931af063c84c26a892a0f1f44fe78 (diff)
downloadbcm5719-llvm-04f9da8f217f0a4790904970b97b0d5410e98cf3.tar.gz
bcm5719-llvm-04f9da8f217f0a4790904970b97b0d5410e98cf3.zip
Elide unnecessary DenseMap copy.
No functionality change. llvm-svn: 218122
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 5779b27a2c4..a36f3143e14 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -246,7 +246,7 @@ class ELFObjectWriter : public MCObjectWriter {
/// \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(MCAssembler &Asm,
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(MCAssembler &Asm, const MCAsmLayout &Layout,
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)
OpenPOWER on IntegriCloud