[llvm] [TableGen] correctly escape dependency filenames (PR #160834)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 01:53:05 PDT 2025
================
@@ -83,6 +85,35 @@ static int reportError(const char *ProgName, Twine Msg) {
return 1;
}
+/// Escape a filename in the dependency file so that it is correctly
+/// interpreted by `make`. This is consistent with Clang, GCC, and lld.
+static TGLexer::DependenciesSetTy::value_type escapeDependencyFilename(
+ const TGLexer::DependenciesSetTy::value_type &Filename) {
----------------
jayfoad wrote:
Using `TGLexer::DependenciesSetTy::value_type` seems over-complicated. Maybe just take a StringRef and return a std:string?
https://github.com/llvm/llvm-project/pull/160834
More information about the llvm-commits
mailing list