[PATCH] fix for CGDebugInfo.cpp filename append

Robinson, Paul Paul_Robinson at playstation.sony.com
Fri Oct 18 08:30:54 PDT 2013


We'd noticed this previously in some cases on Windows;
the appropriate test appears to be that
  clang -c -g foo.c
will produce one entry but
  clang -c -g .\foo.c
will produce two.  (I admit I haven't verified this with
current Windows TOT.)
--paulr

> -----Original Message-----
> From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
> bounces at cs.uiuc.edu] On Behalf Of Eric Christopher
> Sent: Thursday, October 17, 2013 11:52 AM
> To: Hans Wennborg
> Cc: cfe-commits at cs.uiuc.edu cfe
> Subject: Re: [PATCH] fix for CGDebugInfo.cpp filename append
> 
> Should be able to write a test that checks the IR to make sure we
> don't have wrong paths. The backend just gets the info from the
> metadata.
> 
> -eric
> 
> On Thu, Oct 17, 2013 at 11:48 AM, Hans Wennborg <hans at chromium.org>
> wrote:
> > On Thu, Oct 17, 2013 at 8:09 AM, Yaron Keren <yaron.keren at gmail.com>
> wrote:
> >> Hi,
> >>
> >> Filename appending in CGDebugInfo.cpp was implemented as simple
> string
> >> concatenation, resulting in duplicate file debug information on
> Windows due
> >> to wrong path separator.
> >>
> >> The patch uses  llvm::sys::path::append to properly append the
> filename on
> >> all OS.
> >>
> >> Is there a way to use path::append without the SmallString temporary?
> >>
> >> Yaron
> >
> > The patch looks reasonable to me, but I wish there were a test we
> > could update for this.
> >
> > Maybe the debug info folks know if there is a test that picks up the
> > -main-file-name?
> >
> >  - Hans
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits






More information about the cfe-commits mailing list