summaryrefslogtreecommitdiff
path: root/compiler/llvmGen
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2015-11-01 10:15:24 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-01 10:15:25 +0100
commit8fd5cff6fa1cd943a90f19df87389d10a2cb27d1 (patch)
tree4fa73eeea524c7493252f40f1a8d76ebe3bbe0d1 /compiler/llvmGen
parentda1a8da78df3ea8715dc95a874ca6050f06b1908 (diff)
downloadhaskell-8fd5cff6fa1cd943a90f19df87389d10a2cb27d1.tar.gz
llvmGen: Really fix build with Clang
Test Plan: Build with Clang and GCC Reviewers: austin, thomie, hvr, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1414
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r--compiler/llvmGen/LlvmCodeGen/CodeGen.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index cde3276e9f..aa3a0c3f1e 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -476,11 +476,12 @@ genCallWithOverflow
:: ForeignTarget -> Width -> [CmmFormal] -> [CmmActual] -> LlvmM StmtData
genCallWithOverflow t@(PrimTarget op) w [dstV, dstO] [lhs, rhs] = do
-- So far this was only tested for the following four CallishMachOps.
- MASSERT((op `elem` [ MO_Add2 w
- , MO_AddIntC w
- , MO_SubIntC w
- , MO_SubWordC w
- ]))
+ let valid = op `elem` [ MO_Add2 w
+ , MO_AddIntC w
+ , MO_SubIntC w
+ , MO_SubWordC w
+ ]
+ MASSERT(valid)
let width = widthToLlvmInt w
-- This will do most of the work of generating the call to the intrinsic and
-- extracting the values from the struct.