diff options
| author | Sergei Trofimovich <slyfox@gentoo.org> | 2015-10-29 23:03:42 +0000 |
|---|---|---|
| committer | Sergei Trofimovich <siarheit@google.com> | 2015-10-29 23:03:52 +0000 |
| commit | e272ab99f60884e5c510c9597fbdb1a570eedcaa (patch) | |
| tree | 6a09fdec3d2a564483d4fb4b42ee8a3968e0346a /compiler | |
| parent | bbaf76f949426c91d6abbbc5eced1f705530087b (diff) | |
| download | haskell-e272ab99f60884e5c510c9597fbdb1a570eedcaa.tar.gz | |
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
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/nativeGen/X86/Ppr.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index ce63caed6b..0c9507ab28 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -506,9 +506,8 @@ pprInstr (COMMENT _) = empty -- nuke 'em pprInstr (COMMENT s) = ptext (sLit "# ") <> ftext s -} -pprInstr (LOCATION file line col name) - = ptext (sLit "\t.loc ") <> ppr file <+> ppr line <+> ppr col <> - ptext (sLit " /* ") <> text name <> ptext (sLit " */") +pprInstr (LOCATION file line col _name) + = ptext (sLit "\t.loc ") <> ppr file <+> ppr line <+> ppr col pprInstr (DELTA d) = pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d))) |
