[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-17 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. In D71508#1785767 , @probinson wrote: > Do we have a similar problem if the filespec has an embedded ./ or ../ in it? > I'm thinking some broader canonicalization ought to be done here. > $ clang ./dir1/dir2/../dir3/file.c >

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui added a comment. In D71508#1786799 , @aprantl wrote: > Are we sure we want to canonicalize *before* applying -fdebug-prefix-map in > `remapDIPath()`? Honest question, the answer could be yes :-) it canonicalizes before apply

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui added a comment. In D71508#1786804 , @dblaikie wrote: > In D71508#1786212 , @kamleshbhalui > wrote: > > > In D71508#1786148 , @probinson > > wrote: > > > > >

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D71508#1786212 , @kamleshbhalui wrote: > In D71508#1786148 , @probinson wrote: > > > In D71508#1786122 , @kamleshbhalui > > wrote: > > > > >

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Are we sure we want to canonicalize *before* applying -fdebug-prefix-map in `remapDIPath()`? Honest question, the answer could be yes :-) Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:412 + if (!llvm::sys::path::is_absolute(FileName)) { +

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui added a comment. In D71508#1786148 , @probinson wrote: > In D71508#1786122 , @kamleshbhalui > wrote: > > > In D71508#1785767 , @probinson > > wrote: > > > >

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D71508#1786122 , @kamleshbhalui wrote: > In D71508#1785767 , @probinson wrote: > > > Do we have a similar problem if the filespec has an embedded ./ or ../ in > > it? > > > problems

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui added a comment. In D71508#1785767 , @probinson wrote: > Do we have a similar problem if the filespec has an embedded ./ or ../ in it? problems occur only when filespec starts with ./ otherwise it's fine. Repository: rG LLVM Github

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-16 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Do we have a similar problem if the filespec has an embedded ./ or ../ in it? I'm thinking some broader canonicalization ought to be done here. $ clang ./dir1/dir2/../dir3/file.c should resolve to dir1/dir3/file.c shouldn't it? Repository: rG LLVM Github Monorepo

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-14 Thread David Stenberg via Phabricator via cfe-commits
dstenb added a comment. It should be possible to create a test for this using something like: RUN: rm -rf %t && mkdir %t RUN: cp %s %t/filename.c RUN: cd %t RUN: clang ./filename.c [...] Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71508: [DebugInfo] Duplicate file names in debug info

2019-12-13 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui created this revision. kamleshbhalui added reviewers: probinson, dblaikie, vsk, labath. kamleshbhalui added a project: debug-info. Herald added subscribers: cfe-commits, aprantl. Herald added a project: clang. strip/remove the dot slash before creating files for debug info. This