[llvm-lit] Improve the error message when make_paths_relative() fails
authorLouis Dionne <ldionne@apple.com>
Thu, 22 Oct 2020 20:34:19 +0000 (16:34 -0400)
committerLouis Dionne <ldionne@apple.com>
Wed, 28 Oct 2020 21:06:18 +0000 (17:06 -0400)
commit2488e444297f5813613d8fb76fb1f3378fb9171e
treebb1fabdc05448ab2f56344c0473b70c5f6bd472d
parent818bd31906baa398b6aa219a3af3c49790897e84
[llvm-lit] Improve the error message when make_paths_relative() fails

Previously, if make_paths_relative() failed due to some reason, it would
happily keep going and set the ${out_pathlist} to the standard output
of the command, which would be the empty string if the command failed.

This can lead to issues that are difficult to diagnose, since the calling
code will usually try to keep going with a variable that was set to the
empty string.

Differential Revision: https://reviews.llvm.org/D89985
llvm/cmake/modules/AddLLVM.cmake