[Lldb-commits] [lldb] [llvm][tblgen] Add `SourcePath` for `emitSourceFileHeader` (PR #65744)

NAKAMURA Takumi via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 25 07:04:48 PDT 2023


================
@@ -59,4 +60,8 @@ void llvm::emitSourceFileHeader(StringRef Desc, raw_ostream &OS) {
   printLine(OS, Prefix, ' ', Suffix);
   printLine(OS, "\\*===", '-', "===*/");
   OS << '\n';
+
+  // Print the path of source file
+  if (!Record.getInputFilename().empty())
+    OS << "// Generated from: " << Record.getInputFilename() << "\n\n";
----------------
chapuni wrote:

I think this could be enabled if the base path would be given from the build system.

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


More information about the lldb-commits mailing list