[PATCH] D56599: [Support] Remove error return value from one overload of fs::make_absolute

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 11 07:45:54 PST 2019


labath created this revision.
labath added reviewers: zturner, sammccall.
Herald added subscribers: kristina, hiraditya.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D56599

Files:
  clang/lib/Lex/HeaderSearch.cpp
  llvm/include/llvm/Support/FileSystem.h
  llvm/lib/Support/Path.cpp
  llvm/lib/Support/VirtualFileSystem.cpp
  llvm/tools/llvm-opt-report/OptReport.cpp
  llvm/unittests/Support/Path.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56599.181273.patch
Type: text/x-patch
Size: 5605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/b0610c47/attachment.bin>


More information about the llvm-commits mailing list