forked from OSchip/llvm-project
parent
ff8a1a0705
commit
2f56266234
|
@ -123,7 +123,8 @@ DependencyScanningFilesystemSharedCache::get(StringRef Key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::ErrorOr<const CachedFileSystemEntry *>
|
llvm::ErrorOr<const CachedFileSystemEntry *>
|
||||||
DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry(const StringRef Filename) {
|
DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry(
|
||||||
|
const StringRef Filename) {
|
||||||
if (const CachedFileSystemEntry *Entry = getCachedEntry(Filename)) {
|
if (const CachedFileSystemEntry *Entry = getCachedEntry(Filename)) {
|
||||||
return Entry;
|
return Entry;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +165,8 @@ llvm::ErrorOr<llvm::vfs::Status>
|
||||||
DependencyScanningWorkerFilesystem::status(const Twine &Path) {
|
DependencyScanningWorkerFilesystem::status(const Twine &Path) {
|
||||||
SmallString<256> OwnedFilename;
|
SmallString<256> OwnedFilename;
|
||||||
StringRef Filename = Path.toStringRef(OwnedFilename);
|
StringRef Filename = Path.toStringRef(OwnedFilename);
|
||||||
const llvm::ErrorOr<const CachedFileSystemEntry *> Result = getOrCreateFileSystemEntry(Filename);
|
const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
|
||||||
|
getOrCreateFileSystemEntry(Filename);
|
||||||
if (!Result)
|
if (!Result)
|
||||||
return Result.getError();
|
return Result.getError();
|
||||||
return (*Result)->getStatus();
|
return (*Result)->getStatus();
|
||||||
|
@ -224,7 +226,8 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) {
|
||||||
SmallString<256> OwnedFilename;
|
SmallString<256> OwnedFilename;
|
||||||
StringRef Filename = Path.toStringRef(OwnedFilename);
|
StringRef Filename = Path.toStringRef(OwnedFilename);
|
||||||
|
|
||||||
const llvm::ErrorOr<const CachedFileSystemEntry *> Result = getOrCreateFileSystemEntry(Filename);
|
const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
|
||||||
|
getOrCreateFileSystemEntry(Filename);
|
||||||
if (!Result)
|
if (!Result)
|
||||||
return Result.getError();
|
return Result.getError();
|
||||||
return createFile(Result.get(), PPSkipMappings);
|
return createFile(Result.get(), PPSkipMappings);
|
||||||
|
|
Loading…
Reference in New Issue