aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2024-07-12 09:30:33 +0100
committerGitHub <noreply@github.com>2024-07-12 09:30:33 +0100
commitfe9767105af65f0a7345afb6bb2f14e5d4404a15 (patch)
treed199a504f1ac68a502e59e0b180061f8dcc9e2da /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentc5ee3c05ca61f3fae11337c5853aee7b450a9dc6 (diff)
downloadllvm-fe9767105af65f0a7345afb6bb2f14e5d4404a15.zip
llvm-fe9767105af65f0a7345afb6bb2f14e5d4404a15.tar.gz
llvm-fe9767105af65f0a7345afb6bb2f14e5d4404a15.tar.bz2
[lldb][test] Fix ComputeClangResourceDirectory test when CLANG_RESOURCE_DIR is set (#98464)
This was found during testing of llvm snapshots for Fedora. This test was looking for an exact string match of the path calculated by starting with lib/liblldb and with bin/lldb. However when CLANG_RESOURCE_DIR is set to something e.g. "../lib/clang/19", the way the initial path is handled is different. Instead of taking the parent of the parent of the binary, that is foo/bin/lldb/ -> foo/, it uses the parent of the binary and appends CLANG_RESOURCE_DIR to that. As CLANG_RESOURCE_DIR is defined as being a path relative to the parent dir's of the clang binary. This means that if you start with foo/lib/lidblldb the resulting path is lib/../lib/clang/19, but if you start with bin/lldb the result is bin/../lib/clang/19. I don't want to change the starting path of DefaultComputeClangResourceDirectory (which is bin/lldb) as I suspect that's chosen instead of liblldb for good reason. So the way to make this test work is to check not for exact path matches but that the "real" (".." resolved) version of the paths are the same. That way foo/bin/../lib and foo/lib/../lib will be the same.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions