From ddd68e600435f08c0596bfe24de431b1ccc6ff0b Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 13 Mar 2002 13:48:32 +0000 Subject: [PATCH] [project @ 2002-03-13 13:48:32 by simonmar] Cope with VoidRep fields in a static constructor. --- ghc/compiler/nativeGen/AbsCStixGen.lhs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/nativeGen/AbsCStixGen.lhs b/ghc/compiler/nativeGen/AbsCStixGen.lhs index b3ac35b..81a026f 100644 --- a/ghc/compiler/nativeGen/AbsCStixGen.lhs +++ b/ghc/compiler/nativeGen/AbsCStixGen.lhs @@ -231,10 +231,13 @@ Here we handle top-level things, like @CCodeBlock@s and = returnUs (\xs -> table ++ xs) where table = StData PtrRep [StCLbl (infoTableLabelFromCI cl_info)] : - map do_one_amode amodes + foldr do_one_amode [] amodes - do_one_amode amode - = StData (promote_to_word (getAmodeRep amode)) [a2stix amode] + do_one_amode amode rest + | rep == VoidRep = rest + | otherwise = StData (promote_to_word rep) [a2stix amode] : rest + where + rep = getAmodeRep amode -- We need to promote any item smaller than a word to a word promote_to_word pk -- 1.7.10.4