summaryrefslogtreecommitdiff
path: root/includes
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 /includes
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 'includes')
-rw-r--r--includes/Cmm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 1306a2222d..059220a813 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -211,7 +211,7 @@
if (predicate) { \
/*null*/; \
} else { \
- foreign "C" _assertFail(NULL, __LINE__) never returns; \
+ foreign "C" _assertFail(__FILE__, __LINE__) never returns; \
}
#else
#define ASSERT(p) /* nothing */