[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 14:59:50 PDT 2023


CongzheUalberta wrote:

> Can you share what the current behavior is without LTO? (Sorry, my dev machine was recently knocked offline, otherwise I'd check myself).
> 
> If w/o LTO we have relative paths, then w/ LTO we should only emit relative paths and this patch should be changed.
> 
> If w/o LTO we have absolute paths, then this patch LGTM (with the Polly tests fixed up).

Sure thing. Without LTO the current behavior depends on whether the input file path is absolute or relative. If the input file path is relative then the remark output w/o LTO is relative. If the input file path is absolute then the remark output w/o LTO is absolute. 

LTO remark dumps always output the relative path, which causes inconsistent behavior if the input path is absolute path (since preLTO stage would output absolute path).

What I am aiming at in this patch is to make the behavior consistent. I looked deeper into this patch and found out I need to modify this patch a bit. I'll do more testing and then update this patch.

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


More information about the llvm-commits mailing list