[PATCH] D27492: [DWARF] Suppress .loc directives coming from CFI instructions
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 08:33:34 PST 2016
aprantl 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
+
----------------
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.
https://reviews.llvm.org/D27492
More information about the llvm-commits
mailing list