diff options
author | Pavel Labath <pavel@labath.sk> | 2019-01-16 09:55:32 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-01-16 09:55:32 +0000 |
commit | 1ad53ca2b0114004a3bbaf9fbfe23f51aec0ee67 (patch) | |
tree | 6fad304554b8c033b0d203228b30804d215b0715 /llvm/unittests | |
parent | f2e25e708c49fa79a2dbe8b68f3ce4873a489739 (diff) | |
download | bcm5719-llvm-1ad53ca2b0114004a3bbaf9fbfe23f51aec0ee67.tar.gz bcm5719-llvm-1ad53ca2b0114004a3bbaf9fbfe23f51aec0ee67.zip |
[Support] Remove error return value from one overload of fs::make_absolute
Summary:
The version of make_absolute which accepted a specific directory to use
as the "base" for the computation could never fail, even though it
returned a std::error_code. The reason for that seems to be historical
-- the CWD flavour (which can fail due to failure to retrieve CWD) was
there first, and the new version was implemented by extending that.
This removes the error return value from the non-CWD overload and
reimplements the CWD version on top of that. This enables us to remove
some dead code where people were pessimistically trying to handle the
errors returned from this function.
Reviewers: zturner, sammccall
Subscribers: hiraditya, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D56599
llvm-svn: 351317
Diffstat (limited to 'llvm/unittests')
-rw-r--r-- | llvm/unittests/Support/Path.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index 21a6aab73af..97b77e2dfed 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -187,7 +187,7 @@ TEST(Support, Path) { } SmallString<32> Relative("foo.cpp"); - ASSERT_NO_ERROR(sys::fs::make_absolute("/root", Relative)); + sys::fs::make_absolute("/root", Relative); Relative[5] = '/'; // Fix up windows paths. ASSERT_EQ("/root/foo.cpp", Relative); } |