summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-03-01 22:24:46 +0000
committerRui Ueyama <ruiu@google.com>2017-03-01 22:24:46 +0000
commitaab18c0cfc04c80e778d385abb2d15b33dc3bb47 (patch)
treeacb2423d87ca70180e5ed44e4f1f56796683aec5
parent97d7a74b350c41623dd84812363a9803b6418aa1 (diff)
downloadbcm5719-llvm-aab18c0cfc04c80e778d385abb2d15b33dc3bb47.tar.gz
bcm5719-llvm-aab18c0cfc04c80e778d385abb2d15b33dc3bb47.zip
Remove useless variables and declarations.
llvm-svn: 296695
-rw-r--r--lld/ELF/GdbIndex.cpp3
-rw-r--r--lld/ELF/GdbIndex.h7
-rw-r--r--lld/ELF/SyntheticSections.cpp4
3 files changed, 3 insertions, 11 deletions
diff --git a/lld/ELF/GdbIndex.cpp b/lld/ELF/GdbIndex.cpp
index 80ce4e26b20..0cb245cfaba 100644
--- a/lld/ELF/GdbIndex.cpp
+++ b/lld/ELF/GdbIndex.cpp
@@ -122,10 +122,9 @@ GdbIndexBuilder<ELFT>::readPubNamesAndTypes() {
}
std::pair<bool, GdbSymbol *> GdbHashTab::add(uint32_t Hash, size_t Offset) {
- GdbSymbol *&Sym = Map[{Hash, Offset}];
+ GdbSymbol *&Sym = Map[Offset];
if (Sym)
return {false, Sym};
- ++Size;
Sym = make<GdbSymbol>(Hash, Offset);
return {true, Sym};
}
diff --git a/lld/ELF/GdbIndex.h b/lld/ELF/GdbIndex.h
index 3a39cb1ea35..351ac598b34 100644
--- a/lld/ELF/GdbIndex.h
+++ b/lld/ELF/GdbIndex.h
@@ -75,13 +75,8 @@ public:
GdbSymbol *getSymbol(size_t I) { return Table[I]; }
private:
- GdbSymbol **findSlot(uint32_t Hash, size_t Offset);
-
- llvm::DenseMap<std::pair<uint32_t, size_t>, GdbSymbol *> Map;
+ llvm::DenseMap<size_t, GdbSymbol *> Map;
std::vector<GdbSymbol *> Table;
-
- // Size keeps the amount of filled entries in Table.
- size_t Size = 0;
};
} // namespace elf
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index c8f8d7496ee..ddee17975af 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1730,9 +1730,7 @@ template <class ELFT> void GdbIndexSection<ELFT>::readDwarf(InputSection *Sec) {
continue;
}
- std::vector<std::pair<uint32_t, uint8_t>> &CuVec =
- CuVectors[Sym->CuVectorIndex];
- CuVec.push_back({CuId, Pair.second});
+ CuVectors[Sym->CuVectorIndex].push_back({CuId, Pair.second});
}
}
OpenPOWER on IntegriCloud