Skip to content

Commit

Permalink
Fix build breakage from llvm r351317
Browse files Browse the repository at this point in the history
The two-argument version of  llvm::sys::fs::make_absolute no longer
returns an error code.

llvm-svn: 351319
  • Loading branch information
labath committed Jan 16, 2019
1 parent e94470f commit 7b55654
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions clang-tools-extra/clang-move/ClangMove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ std::string MakeAbsolutePath(StringRef CurrentDir, StringRef Path) {
return "";
llvm::SmallString<128> InitialDirectory(CurrentDir);
llvm::SmallString<128> AbsolutePath(Path);
if (std::error_code EC =
llvm::sys::fs::make_absolute(InitialDirectory, AbsolutePath))
llvm::errs() << "Warning: could not make absolute file: '" << EC.message()
<< '\n';
llvm::sys::fs::make_absolute(InitialDirectory, AbsolutePath);
return CleanPath(std::move(AbsolutePath));
}

Expand Down
4 changes: 1 addition & 3 deletions clang-tools-extra/clangd/tool/ClangdMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ class TestScheme : public URIScheme {
Body = Body.ltrim('/');
llvm::SmallVector<char, 16> Path(Body.begin(), Body.end());
path::native(Path);
auto Err = fs::make_absolute(TestScheme::TestDir, Path);
if (Err)
llvm_unreachable("Failed to make absolute path in test scheme.");
fs::make_absolute(TestScheme::TestDir, Path);
return std::string(Path.begin(), Path.end());
}

Expand Down

0 comments on commit 7b55654

Please sign in to comment.