Use __FILE__ for Cmm assertion locations, fix #8619
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Sun, 17 Jun 2018 16:50:18 +0000 (12:50 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 17 Jun 2018 16:50:25 +0000 (12:50 -0400)
commit008ea12dd93b9f9104f0b532b278a31b719bafb8
tree1143a67d47f70071e1c22e90187279db9e8b56fc
parentb8e349922b4841771a59e264183219e6cad3e942
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
compiler/cmm/CmmParse.y
includes/Cmm.h
rts/PrimOps.cmm