[PATCH] DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags with empty file names.

Peter Collingbourne peter at pcc.me.uk
Wed Mar 25 11:02:41 PDT 2015


On Wed, Mar 25, 2015 at 10:52:12AM -0700, David Blaikie wrote:
> On Wed, Mar 25, 2015 at 10:49 AM, Paul Robinson <
> Paul_Robinson at playstation.sony.com> wrote:
> 
> > REPOSITORY
> >   rL LLVM
> >
> > ================
> > Comment at: test/DebugInfo/X86/missing-file-line.ll:3
> > @@ +2,3 @@
> > +
> > +; RUN: llc -mtriple=x86_64-linux-gnu -filetype=obj %s -o - |
> > llvm-dwarfdump -debug-dump=all - > %t
> > +; RUN: FileCheck --check-prefix=CHECK1 %s < %t
> > ----------------
> > pcc wrote:
> > > dblaikie wrote:
> > > > Ideally just pipe dwarfdump's output straight to FileCheck without the
> > intermediate %t - then just use a single set of CHECK (rather than 3
> > separate CHECK prefixes) lines for the tests.
> > > Previously I used `CHECK-DAG`, but I couldn't see a way to do the
> > `CHECK-NOT` checks within a single run of FileCheck while keeping them
> > order independent.
> > That would hard-code an order for the three DIEs, which is probably okay
> > for the structure/member but I'm not so sure about the typedef.
> >
> 
> Yeah, this is a known limitation of the way we write tests, but we tend to
> prefer to still do it this way - maybe one day we'll be able to beef up
> FileCheck (or make llvm-dwarfdump smart enough to have a sort option or
> something) to make this testing more resilient. For now I'd rather just be
> consistent rather than do anything too fancy. The ordering doesn't change
> too often.

Okay, I've changed the test this way in r233201.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list