mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Turn some DenseMaps that are only used for set operations into DenseSets.
DenseSet has better memory efficiency now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223589 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1593,8 +1593,7 @@ bool Linker::StructTypeKeyInfo::isEqual(const StructType *LHS,
|
||||
|
||||
void Linker::IdentifiedStructTypeSet::addNonOpaque(StructType *Ty) {
|
||||
assert(!Ty->isOpaque());
|
||||
bool &Entry = NonOpaqueStructTypes[Ty];
|
||||
Entry = true;
|
||||
NonOpaqueStructTypes.insert(Ty);
|
||||
}
|
||||
|
||||
void Linker::IdentifiedStructTypeSet::addOpaque(StructType *Ty) {
|
||||
@@ -1609,7 +1608,7 @@ Linker::IdentifiedStructTypeSet::findNonOpaque(ArrayRef<Type *> ETypes,
|
||||
auto I = NonOpaqueStructTypes.find_as(Key);
|
||||
if (I == NonOpaqueStructTypes.end())
|
||||
return nullptr;
|
||||
return I->first;
|
||||
return *I;
|
||||
}
|
||||
|
||||
bool Linker::IdentifiedStructTypeSet::hasType(StructType *Ty) {
|
||||
@@ -1618,7 +1617,7 @@ bool Linker::IdentifiedStructTypeSet::hasType(StructType *Ty) {
|
||||
auto I = NonOpaqueStructTypes.find(Ty);
|
||||
if (I == NonOpaqueStructTypes.end())
|
||||
return false;
|
||||
return I->first == Ty;
|
||||
return *I == Ty;
|
||||
}
|
||||
|
||||
void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
|
||||
|
Reference in New Issue
Block a user