x86 codegen: don't generate location comments ghc-7.10.3-rc3
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 29 Oct 2015 23:03:42 +0000 (23:03 +0000)
committerBen Gamari <ben@smart-cactus.org>
Sat, 14 Nov 2015 19:59:19 +0000 (20:59 +0100)
commit2bc3be72d52f29a9fd50a0f53ad977d2ec926841
treecd541735466961ca19d23cd7d3bec747ee3cf0b2
parent86318ff9572a79819b02f9a79b855fa4d4a41df2
x86 codegen: don't generate location comments

The following source snippet 'module A where x */* y = 42'
when being compiled with '-g' option emits syntactically
invalid comment for GNU as:

    .text
        .align 8
        .loc 1 3 1 /* */* */

Fixed by not emitting comments at all. We already suppress
all asm comments in 'X86/Ppr.hs'.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Test Plan: added test and check it works

Reviewers: scpmw, simonmar, austin, bgamari

Reviewed By: simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1386

GHC Trac Issues: #10667
compiler/nativeGen/X86/Ppr.hs
testsuite/tests/codeGen/should_compile/T10667.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_compile/all.T