[clang] [llvm][tblgen] Add `SourcePath` for `emitSourceFileHeader` (PR #65744)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 08:40:04 PDT 2023


AaronBallman wrote:

> I am not sure how to keep only the `llvm-project/xxxx/Filename` path except by hard-coding. Or how about only keeping the base file name? This could limit it to within 80 characters.

I'd recommend using this API: https://github.com/llvm/llvm-project/blob/2f23666ae7e434a222a67ac6499d118035ab7903/llvm/include/llvm/Support/Path.h#L357 to get the base filename from the path, and then print just the base filename.

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


More information about the cfe-commits mailing list