[commit: ghc] master: Add a case for CmmLabelDiffOff to cmmOffsetLit (09209de)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/09209de417b16cf9a06d655dbe7415ba9eea757d

>---------------------------------------------------------------

commit 09209de417b16cf9a06d655dbe7415ba9eea757d
Author: Simon Marlow <[email protected]>
Date:   Wed Oct 24 10:10:04 2012 +0100

    Add a case for CmmLabelDiffOff to cmmOffsetLit

>---------------------------------------------------------------

 compiler/cmm/CmmUtils.hs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs
index f420e7d..d52c6a3 100644
--- a/compiler/cmm/CmmUtils.hs
+++ b/compiler/cmm/CmmUtils.hs
@@ -222,6 +222,8 @@ cmmRegOff reg byte_off = CmmRegOff reg byte_off
 cmmOffsetLit :: CmmLit -> Int -> CmmLit
 cmmOffsetLit (CmmLabel l)      byte_off = cmmLabelOff l byte_off
 cmmOffsetLit (CmmLabelOff l m) byte_off = cmmLabelOff l (m+byte_off)
+cmmOffsetLit (CmmLabelDiffOff l1 l2 m) byte_off
+                                        = CmmLabelDiffOff l1 l2 (m+byte_off)
 cmmOffsetLit (CmmInt m rep)    byte_off = CmmInt (m + fromIntegral byte_off) rep
 cmmOffsetLit _                 byte_off = pprPanic "cmmOffsetLit" (ppr byte_off)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.