[PATCH] D141220: [TableGen][SourceMgr] Correctly append filename to include directories
Jacques Pienaar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 8 12:12:19 PST 2023
jpienaar 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.
----------------
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()`.
================
Comment at: llvm/lib/Support/SourceMgr.cpp:67
}
+ IncludedFile = static_cast<std::string>(Buffer);
----------------
Shouldn't this be only set if there was no error?
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