summaryrefslogtreecommitdiffstats
path: root/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
committerFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
commitabdbb605f2c3cbe63cd589da230f648535dff76b (patch)
tree5f8677c5a6cdf9e4aebd71560932f399f956f7cc /lib/Basic/FileManager.cpp
parent19e630a4739c684e5848d2f926d0beb114bbce7b (diff)
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileManager.cpp')
-rw-r--r--lib/Basic/FileManager.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp
index 7e2d01c498..d339b972ae 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -71,7 +71,7 @@ void FileManager::addStatCache(std::unique_ptr<FileSystemStatCache> statCache,
StatCache = std::move(statCache);
return;
}
-
+
FileSystemStatCache *LastCache = StatCache.get();
while (LastCache->getNextStatCache())
LastCache = LastCache->getNextStatCache();
@@ -82,18 +82,18 @@ void FileManager::addStatCache(std::unique_ptr<FileSystemStatCache> statCache,
void FileManager::removeStatCache(FileSystemStatCache *statCache) {
if (!statCache)
return;
-
+
if (StatCache.get() == statCache) {
// This is the first stat cache.
StatCache = StatCache->takeNextStatCache();
return;
}
-
+
// Find the stat cache in the list.
FileSystemStatCache *PrevCache = StatCache.get();
while (PrevCache && PrevCache->getNextStatCache() != statCache)
PrevCache = PrevCache->getNextStatCache();
-
+
assert(PrevCache && "Stat cache not found for removal");
PrevCache->setNextStatCache(statCache->takeNextStatCache());
}
@@ -247,7 +247,7 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile,
return nullptr;
}
-
+
// FIXME: Use the directory info to prune this, before doing the stat syscall.
// FIXME: This will reduce the # syscalls.
@@ -394,7 +394,7 @@ FileManager::getVirtualFile(StringRef Filename, off_t Size,
bool FileManager::FixupRelativePath(SmallVectorImpl<char> &path) const {
StringRef pathRef(path.data(), path.size());
- if (FileSystemOpts.WorkingDir.empty()
+ if (FileSystemOpts.WorkingDir.empty()
|| llvm::sys::path::is_absolute(pathRef))
return false;
@@ -505,14 +505,14 @@ void FileManager::GetUniqueIDMapping(
SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
UIDToFiles.clear();
UIDToFiles.resize(NextFileUID);
-
+
// Map file entries
for (llvm::StringMap<FileEntry*, llvm::BumpPtrAllocator>::const_iterator
FE = SeenFileEntries.begin(), FEEnd = SeenFileEntries.end();
FE != FEEnd; ++FE)
if (FE->getValue() && FE->getValue() != NON_EXISTENT_FILE)
UIDToFiles[FE->getValue()->getUID()] = FE->getValue();
-
+
// Map virtual file entries
for (const auto &VFE : VirtualFileEntries)
if (VFE && VFE.get() != NON_EXISTENT_FILE)