Fix Trac #1988; keep the ru_fn field of a RULE up to date
[ghc-hetmet.git] / compiler / codeGen / CgUtils.hs
index 260248d..13add6c 100644 (file)
@@ -1,3 +1,10 @@
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
 -----------------------------------------------------------------------------
 --
 -- Code generator utilities; mostly monadic
@@ -6,13 +13,6 @@
 --
 -----------------------------------------------------------------------------
 
-{-# OPTIONS -w #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and fix
--- any warnings in the module. See
---     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
--- for details
-
 module CgUtils (
        addIdReps,
        cgLit,
@@ -51,7 +51,7 @@ module CgUtils (
   ) where
 
 #include "HsVersions.h"
-#include "MachRegs.h"
+#include "../includes/MachRegs.h"
 
 import CgMonad
 import TyCon
@@ -994,6 +994,7 @@ getSRTInfo = do
     -- TODO: Should we panic in this case?
     -- Someone obviously thinks there should be an SRT
     NoSRT -> return NoC_SRT
+    SRTEntries {} -> panic "getSRTInfo: SRTEntries.  Perhaps you forgot to run SimplStg?"
     SRT off len bmp
       | len > hALF_WORD_SIZE_IN_BITS || bmp == [fromIntegral srt_escape]
       -> do id <- newUnique