Remove useless variables and declarations.

llvm-svn: 296695
This commit is contained in:
Rui Ueyama 2017-03-01 22:24:46 +00:00
parent 97d7a74b35
commit aab18c0cfc
3 changed files with 3 additions and 11 deletions

View File

@ -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};
}

View File

@ -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

View File

@ -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});
}
}