aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2025-07-01 20:21:51 -0700
committerGitHub <noreply@github.com>2025-07-01 20:21:51 -0700
commit2a702cdc38f96989cb41c0b863d977f0d8f4f325 (patch)
treec0003f69a84ef1ccc674a156d0356fb20b285102 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parentaa1d9a4c31040daa7686560e24f7c06090f8a2e6 (diff)
downloadllvm-2a702cdc38f96989cb41c0b863d977f0d8f4f325.zip
llvm-2a702cdc38f96989cb41c0b863d977f0d8f4f325.tar.gz
llvm-2a702cdc38f96989cb41c0b863d977f0d8f4f325.tar.bz2
Driver: Avoid llvm::sys::path::append if resource directory absolute.
After #145996 CLANG_RESOURCE_DIR can be an absolute path so we need to handle it correctly in the driver. llvm::sys::path::append does not append absolute paths in the way that I expected (or consistent with other similar APIs such as C++17 std::filesystem::path::append or Python os.path.join); instead, it effectively discards the leading / and appends the resulting relative path (e.g. append(P, "/bar") with P = "/foo" sets P to "/foo/bar"). Many tests start failing if I try to align llvm::sys::path::append with the other APIs because of callers that expect the existing behavior, so for now let's add a special case here for absolute resource paths, and document the behavior in Path.h. Reviewers: MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/146449
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions