aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2024-09-19 20:46:09 +0300
committerGitHub <noreply@github.com>2024-09-19 20:46:09 +0300
commitcead9044a995910306e2e64b426fcc8042d7e0ef (patch)
treeea7c3f5e6134bae3e594457e09986d370b9f6484 /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent0265981b6ec0f46fc372897fef7f945d8f4625c2 (diff)
downloadllvm-cead9044a995910306e2e64b426fcc8042d7e0ef.zip
llvm-cead9044a995910306e2e64b426fcc8042d7e0ef.tar.gz
llvm-cead9044a995910306e2e64b426fcc8042d7e0ef.tar.bz2
[clang-scan-deps] Don't inspect Args[0] as an option (#109050)
Since a26ec542371652e1d774696e90016fd5b0b1c191, we expand the executable name to an absolute path, if it isn't already one, if found in path. This broke a couple tests in some environments; when the clang workdir resides in a path under e.g. /opt. Tests that only use a tool name like "clang-cl" would get expanded to the absolute path in the build tree. The loop for finding the last "-o" like option for clang-cl command lines would inspect all arguments, including Args[0] which is the executable name itself. As an /opt path matches Arg.starts_with("/o"), this would get detected as an object file output name in cases where there was no other explicit output argument. Thus, this fixes those tests in workdirs under e.g. /opt.
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions