FIX #2276: foreign import stdcall "&foo" doesn't work
[ghc-hetmet.git] / compiler / cmm / CmmLint.hs
index c4aee8a..f36df59 100644 (file)
@@ -17,8 +17,6 @@ module CmmLint (
   cmmLint, cmmLintTop
   ) where
 
-#include "HsVersions.h"
-
 import Cmm
 import CLabel
 import MachOp
@@ -43,7 +41,7 @@ cmmLintTop top = runCmmLint $ lintCmmTop top
 runCmmLint :: CmmLint a -> Maybe SDoc
 runCmmLint l = 
    case unCL l of
-       Left err -> Just (ptext SLIT("Cmm lint error:") $$ nest 2 err)
+       Left err -> Just (ptext (sLit "Cmm lint error:") $$ nest 2 err)
        Right _  -> Nothing
 
 lintCmmTop :: (GenCmmTop h i (ListGraph CmmStmt)) -> CmmLint ()
@@ -138,7 +136,7 @@ lintCmmStmt labels = lint
             lintCmmExpr r
             return ()
           lint (CmmCall target _res args _ _) =
-              lintTarget target >> mapM_ (lintCmmExpr . hintlessCmm) args
+              lintTarget target >> mapM_ (lintCmmExpr . kindlessCmm) args
           lint (CmmCondBranch e id) = checkTarget id >> lintCmmExpr e >> checkCond e
           lint (CmmSwitch e branches) = do
             mapM_ checkTarget $ catMaybes branches
@@ -146,8 +144,8 @@ lintCmmStmt labels = lint
             if (erep == wordRep)
               then return ()
               else cmmLintErr (text "switch scrutinee is not a word: " <> ppr e)
-          lint (CmmJump e args) = lintCmmExpr e >> mapM_ (lintCmmExpr . hintlessCmm) args
-          lint (CmmReturn ress) = mapM_ (lintCmmExpr . hintlessCmm) ress
+          lint (CmmJump e args) = lintCmmExpr e >> mapM_ (lintCmmExpr . kindlessCmm) args
+          lint (CmmReturn ress) = mapM_ (lintCmmExpr . kindlessCmm) ress
           lint (CmmBranch id)    = checkTarget id
           checkTarget id = if elemBlockSet id labels then return ()
                            else cmmLintErr (text "Branch to nonexistent id" <+> ppr id)