Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Fix FileManager invalidation issue for file redirect #365

Open
wants to merge 1 commit into
base: tensorflow
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/Basic/FileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ FileManager::getFileRef(StringRef Filename, bool openFile, bool CacheFailure) {
// In addition to re-interning the name, construct a redirecting seen file
// entry, that will point to the name the filesystem actually wants to use.
StringRef *Redirect = new (CanonicalNameStorage) StringRef(InterndFileName);
SeenFileInsertResult.first->second = Redirect;
auto SeenFileInsertResultIt = SeenFileEntries.find(Filename);
assert(SeenFileInsertResultIt != SeenFileEntries.end() &&
"unexpected SeenFileEntries cache miss");
SeenFileInsertResultIt->second = Redirect;
}

if (UFE.isValid()) { // Already have an entry with this inode, return it.
Expand Down