x86 codegen: don't generate location comments
ClosedPublic

Authored by trofi on Oct 27 2015, 6:06 PM.

Details

Summary

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
al asm comments in 'X86/Ppr.hs'.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>

Test Plan

added test and check it works

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trofi updated this revision to Diff 4729.Oct 27 2015, 6:06 PM
trofi retitled this revision from to x86 codegen: don't generate location comments.
trofi updated this object.
trofi edited the test plan for this revision. (Show Details)
trofi added reviewers: scpmw, simonmar.
trofi updated the Trac tickets for this revision.
simonmar accepted this revision.Oct 28 2015, 6:48 PM
simonmar edited edge metadata.
simonmar added inline comments.
compiler/nativeGen/X86/Ppr.hs
511

Let's not have commented-out code, better to just delete it

This revision is now accepted and ready to land.Oct 28 2015, 6:48 PM
trofi updated this revision to Diff 4767.Oct 29 2015, 3:46 PM
trofi edited edge metadata.

Dropped comment altogether.

trofi marked an inline comment as done.Oct 29 2015, 3:47 PM
This revision was automatically updated to reflect the committed changes.