aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit05d96f98cbd96dab7f4ea1ea4ebe4285597e7e88 (patch)
treeb32c92e060826c319744e00e4f74a20de33ad62f /lib/MC/MachObjectWriter.cpp
parentfdeb9fe5e08146d9cb953000cb893eda80329a08 (diff)
downloadexternal_llvm-05d96f98cbd96dab7f4ea1ea4ebe4285597e7e88.zip
external_llvm-05d96f98cbd96dab7f4ea1ea4ebe4285597e7e88.tar.gz
external_llvm-05d96f98cbd96dab7f4ea1ea4ebe4285597e7e88.tar.bz2
Reduce duplicated hash map lookups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index 5820a22..c57b0d6 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/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.
//