[PATCH] D27492: [DWARF] Suppress .loc directives coming from CFI instructions
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 12:48:20 PST 2016
probinson added inline comments.
================
Comment at: test/DebugInfo/Generic/no-cfi-loc.ll:2
+; RUN: %llc_dwarf -filetype=asm -use-unknown-locations < %s | FileCheck %s
+; CHECK-NOT: .loc 1 0 0
+
----------------
aprantl wrote:
> probinson wrote:
> > aprantl wrote:
> > > Short comment on what is being checked here?
> > > And is there anything positive that could be checked for, too? Tests that only CHECK-NOT love to break without anybody noticing :-)
> > It ends up emitting a CFI instruction with no debug location. The test is verifying that this does not result in a line-0 record (that we skip the CFI instruction).
> >
> > Although, I now realize the fact that there is a CFI instruction at all is not obvious! Maybe I should turn this into an MIR test instead.
> My main point was that a test like this would work even if you symlink llc to /usr/bin/true. I would suggest to at least check for the function label and one other .loc directive that is expected to be in the output.
Sorry, didn't see this before I committed. The new test does look for the .cfi directive, and verifies that no line-0 directive appears before that.
I could add more positive checks if you think that would be more robust.
Repository:
rL LLVM
https://reviews.llvm.org/D27492
More information about the llvm-commits
mailing list