summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-08-22 15:37:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-08-22 15:37:57 +0000
commitf29db275b2c1fef8ffdee057af01509bd6dd6a45 (patch)
tree821f29370cd4c27df677e4be73c5c86526fa06cc /llvm/lib/MC/MachObjectWriter.cpp
parentfc6eb7d3833e0233cda51e18a1f9e21f42c077e3 (diff)
downloadbcm5719-llvm-f29db275b2c1fef8ffdee057af01509bd6dd6a45.tar.gz
bcm5719-llvm-f29db275b2c1fef8ffdee057af01509bd6dd6a45.zip
Reduce duplicated hash map lookups.
llvm-svn: 162362
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index 5820a224c52..c57b0d65c1d 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -396,8 +396,7 @@ void MachObjectWriter::BindIndirectSymbols(MCAssembler &Asm) {
continue;
// Initialize the section indirect symbol base, if necessary.
- if (!IndirectSymBase.count(it->SectionData))
- IndirectSymBase[it->SectionData] = IndirectIndex;
+ IndirectSymBase.insert(std::make_pair(it->SectionData, IndirectIndex));
Asm.getOrCreateSymbolData(*it->Symbol);
}
@@ -414,8 +413,7 @@ void MachObjectWriter::BindIndirectSymbols(MCAssembler &Asm) {
continue;
// Initialize the section indirect symbol base, if necessary.
- if (!IndirectSymBase.count(it->SectionData))
- IndirectSymBase[it->SectionData] = IndirectIndex;
+ IndirectSymBase.insert(std::make_pair(it->SectionData, IndirectIndex));
// Set the symbol type to undefined lazy, but only on construction.
//
OpenPOWER on IntegriCloud