forked from OSchip/llvm-project
Debug Info: Use the full module name as a key when caching DIModules.
The signature may not have been computed at the time the module reference is generated (e.g.: in the future while emitting debug info for a clang module). Using the full module name is safe because each clang module may only have a single definition. NFC. llvm-svn: 248037
This commit is contained in:
parent
33896a9872
commit
201e10d007
|
@ -1674,7 +1674,7 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
|
|||
|
||||
llvm::DIModule *
|
||||
CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod) {
|
||||
auto &ModRef = ModuleRefCache[Mod.Signature];
|
||||
auto &ModRef = ModuleRefCache[Mod.ModuleName];
|
||||
if (ModRef)
|
||||
return cast<llvm::DIModule>(ModRef);
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ class CGDebugInfo {
|
|||
/// Cache of previously constructed interfaces which may change.
|
||||
llvm::SmallVector<ObjCInterfaceCacheEntry, 32> ObjCInterfaceCache;
|
||||
|
||||
/// Cache of references to AST files such as PCHs or modules.
|
||||
llvm::DenseMap<uint64_t, llvm::TrackingMDRef> ModuleRefCache;
|
||||
/// Cache of references to clang modules and precompiled headers.
|
||||
llvm::StringMap<llvm::TrackingMDRef> ModuleRefCache;
|
||||
|
||||
/// List of interfaces we want to keep even if orphaned.
|
||||
std::vector<void *> RetainedTypes;
|
||||
|
|
Loading…
Reference in New Issue