summaryrefslogtreecommitdiff
path: root/compiler/cmm
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2018-06-17 12:50:18 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-17 12:50:25 -0400
commit008ea12dd93b9f9104f0b532b278a31b719bafb8 (patch)
tree1143a67d47f70071e1c22e90187279db9e8b56fc /compiler/cmm
parentb8e349922b4841771a59e264183219e6cad3e942 (diff)
downloadhaskell-008ea12dd93b9f9104f0b532b278a31b719bafb8.tar.gz
Use __FILE__ for Cmm assertion locations, fix #8619
It seems like we currently support string literals in Cmm, so we can use __LINE__ CPP macro in assertion macros. This improves error messages that previously looked like ASSERTION FAILED: file (null), line 1302 (null) part now shows the actual file name. Also inline some single-use string literals in PrimOps.cmm. Reviewers: bgamari, simonmar, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4862
Diffstat (limited to 'compiler/cmm')
-rw-r--r--compiler/cmm/CmmParse.y2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index 2113f20a0f..4d7e288381 100644
--- a/compiler/cmm/CmmParse.y
+++ b/compiler/cmm/CmmParse.y
@@ -402,8 +402,6 @@ statics :: { [CmmParse [CmmStatic]] }
: {- empty -} { [] }
| static statics { $1 : $2 }
--- Strings aren't used much in the RTS HC code, so it doesn't seem
--- worth allowing inline strings. C-- doesn't allow them anyway.
static :: { CmmParse [CmmStatic] }
: type expr ';' { do e <- $2;
return [CmmStaticLit (getLit e)] }