[PATCH] D141220: [TableGen][SourceMgr] Correctly append filename to include directories
Markus Böck via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 8 12:24:09 PST 2023
zero9178 marked an inline comment as done.
zero9178 added inline comments.
================
Comment at: llvm/lib/Support/SourceMgr.cpp:59
+ SmallString<64> Buffer;
// If the file didn't exist directly, see if it's in an include path.
----------------
jpienaar wrote:
> How does this compare to using std::filesystem::path? (Creating a path and concatenating with operation/ and then using string method - seems like all could be `(std::filesystem::path(IncludeDirectories[i]) / Filename).string()`.
The `std::filesystem` solution you proposed acts the same way as `llvm::sys::path::append` (problematic case tested with both MSVC STL and libc++ on Windows).
That said, this would be the first usage of `std::filesystem` in the monorepo (minus libc++ ofc), and not something that is currently supported by the minimum compiler versions I believe.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141220/new/
https://reviews.llvm.org/D141220
More information about the llvm-commits
mailing list