Skip to content

Commit 78d6b8d

Browse files
committed
Change DIFileCache from a DenseMap to a StringMap.
We have received crash reports indicating a crash in DensMap::lookupBucketFor. This change avoids a crash caused by a filename being a stale reference. rdar://problem/29793594
1 parent 243b91a commit 78d6b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
8787
/// @{
8888
llvm::DenseMap<LocalScopeHash, llvm::TrackingMDNodeRef> ScopeCache;
8989
llvm::DenseMap<const SILDebugScope *, llvm::TrackingMDNodeRef> InlinedAtCache;
90-
llvm::DenseMap<llvm::StringRef, llvm::TrackingMDNodeRef> DIFileCache;
9190
llvm::DenseMap<const void *, SILLocation::DebugLoc> DebugLocCache;
9291
llvm::DenseMap<TypeBase *, llvm::TrackingMDNodeRef> DITypeCache;
9392
llvm::StringMap<llvm::TrackingMDNodeRef> DIModuleCache;
93+
llvm::StringMap<llvm::TrackingMDNodeRef> DIFileCache;
9494
TrackingDIRefMap DIRefMap;
9595
/// @}
9696

0 commit comments

Comments
 (0)