mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 00:46:45 +08:00
Return false if the identifier is not in the global module index.
This allows clients to use the idiom:
if (GlobalIndex->lookupIdentifier(Name, FoundModules)) {
// work on the FoundModules
}
This is also a minor performance improvent for clang.
Differential Revision: https://reviews.llvm.org/D81077
This commit is contained in:
@@ -321,7 +321,7 @@ bool GlobalModuleIndex::lookupIdentifier(StringRef Name, HitSet &Hits) {
|
||||
= *static_cast<IdentifierIndexTable *>(IdentifierIndex);
|
||||
IdentifierIndexTable::iterator Known = Table.find(Name);
|
||||
if (Known == Table.end()) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
SmallVector<unsigned, 2> ModuleIDs = *Known;
|
||||
|
||||
Reference in New Issue
Block a user