[llvm] [TableGen] Strip directories from generated include (PR #168409)

Keith Smiley via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 09:46:13 PST 2025


================
@@ -104,7 +105,8 @@ static void emitInclude(StringRef FilenamePrefix, StringRef IncludeFile,
                         StringRef GuardMacro, raw_ostream &OS) {
   OS << "#ifdef " << GuardMacro << '\n';
   OS << "#undef " << GuardMacro << '\n';
-  OS << "#include \"" << FilenamePrefix << IncludeFile << "\"\n";
+  OS << "#include \"" << sys::path::stem(FilenamePrefix) << IncludeFile
+     << "\"\n";
----------------
keith wrote:

ok lmk when you update it and i can test it out

https://github.com/llvm/llvm-project/pull/168409


More information about the llvm-commits mailing list