Skip to content

Commit

Permalink
[ScanDeps] clang-format, 80 cols.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374439 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Bigcheese committed Oct 10, 2019
1 parent 64ab261 commit 188c30f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ DependencyScanningFilesystemSharedCache::get(StringRef Key) {
}

llvm::ErrorOr<const CachedFileSystemEntry *>
DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry(const StringRef Filename) {
if (const CachedFileSystemEntry* Entry = getCachedEntry(Filename)) {
DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry(
const StringRef Filename) {
if (const CachedFileSystemEntry *Entry = getCachedEntry(Filename)) {
return Entry;
}

Expand Down Expand Up @@ -164,7 +165,8 @@ llvm::ErrorOr<llvm::vfs::Status>
DependencyScanningWorkerFilesystem::status(const Twine &Path) {
SmallString<256> OwnedFilename;
StringRef Filename = Path.toStringRef(OwnedFilename);
const llvm::ErrorOr<const CachedFileSystemEntry *> Result = getOrCreateFileSystemEntry(Filename);
const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
getOrCreateFileSystemEntry(Filename);
if (!Result)
return Result.getError();
return (*Result)->getStatus();
Expand Down Expand Up @@ -224,7 +226,8 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) {
SmallString<256> OwnedFilename;
StringRef Filename = Path.toStringRef(OwnedFilename);

const llvm::ErrorOr<const CachedFileSystemEntry *> Result = getOrCreateFileSystemEntry(Filename);
const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
getOrCreateFileSystemEntry(Filename);
if (!Result)
return Result.getError();
return createFile(Result.get(), PPSkipMappings);
Expand Down

0 comments on commit 188c30f

Please sign in to comment.