Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e5d8b4d0c6dd20a51597517208cbd4b0cc50c7de

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

commit e5d8b4d0c6dd20a51597517208cbd4b0cc50c7de
Author: Ian Lynagh <[email protected]>
Date:   Tue May 31 22:09:22 2011 +0100

    Remove some unused CPP macros

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

 compiler/nativeGen/NCG.h      |   73 -----------------------------------------
 compiler/nativeGen/PPC/Ppr.hs |    7 +---
 compiler/nativeGen/X86/Ppr.hs |   10 +-----
 3 files changed, 2 insertions(+), 88 deletions(-)

diff --git a/compiler/nativeGen/NCG.h b/compiler/nativeGen/NCG.h
index 6771b75..af0ff0e 100644
--- a/compiler/nativeGen/NCG.h
+++ b/compiler/nativeGen/NCG.h
@@ -14,97 +14,24 @@
 #define COMMA ,
 
 -- - - - - - - - - - - - - - - - - - - - - - 
-#if alpha_TARGET_ARCH
-# define IF_ARCH_alpha(x,y) x
-#else
-# define IF_ARCH_alpha(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
 #if i386_TARGET_ARCH
 # define IF_ARCH_i386(x,y) x
 #else
 # define IF_ARCH_i386(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
-#if x86_64_TARGET_ARCH
-# define IF_ARCH_x86_64(x,y) x
-#else
-# define IF_ARCH_x86_64(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if freebsd_TARGET_OS
-# define IF_OS_freebsd(x,y) x
-#else
-# define IF_OS_freebsd(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if dragonfly_TARGET_OS
-# define IF_OS_dragonfly(x,y) x
-#else
-# define IF_OS_dragonfly(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if netbsd_TARGET_OS
-# define IF_OS_netbsd(x,y) x
-#else
-# define IF_OS_netbsd(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if openbsd_TARGET_OS
-# define IF_OS_openbsd(x,y) x
-#else
-# define IF_OS_openbsd(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
 #if linux_TARGET_OS
 # define IF_OS_linux(x,y) x
 #else
 # define IF_OS_linux(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
-#if linuxaout_TARGET_OS
-# define IF_OS_linuxaout(x,y) x
-#else
-# define IF_OS_linuxaout(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if bsdi_TARGET_OS
-# define IF_OS_bsdi(x,y) x
-#else
-# define IF_OS_bsdi(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if cygwin32_TARGET_OS
-# define IF_OS_cygwin32(x,y) x
-#else
-# define IF_OS_cygwin32(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
 #if sparc_TARGET_ARCH
 # define IF_ARCH_sparc(x,y) x
 #else
 # define IF_ARCH_sparc(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
-#if sunos4_TARGET_OS
-# define IF_OS_sunos4(x,y) x
-#else
-# define IF_OS_sunos4(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
--- NB: this will catch i386-*-solaris2, too
-#if solaris2_TARGET_OS
-# define IF_OS_solaris2(x,y) x
-#else
-# define IF_OS_solaris2(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
-#if powerpc_TARGET_ARCH
-# define IF_ARCH_powerpc(x,y) x
-#else
-# define IF_ARCH_powerpc(x,y) y
-#endif
--- - - - - - - - - - - - - - - - - - - - - - 
 #if darwin_TARGET_OS
 # define IF_OS_darwin(x,y) x
 #else
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index 8d8b16a..eac2d25 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -352,14 +352,9 @@ pprInstr :: Instr -> Doc
 pprInstr (COMMENT _) = empty -- nuke 'em
 {-
 pprInstr (COMMENT s)
-   =  IF_ARCH_alpha( ((<>) (ptext (sLit "\t# ")) (ftext s))
-     ,IF_ARCH_sparc( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_i386( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_x86_64( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_powerpc( IF_OS_linux(
+     IF_OS_linux(
         ((<>) (ptext (sLit "# ")) (ftext s)),
         ((<>) (ptext (sLit "; ")) (ftext s)))
-     ,)))))
 -}
 pprInstr (DELTA d)
    = pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d)))
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index 38b6344..bf3e4dd 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -492,15 +492,7 @@ pprInstr :: Instr -> Doc
 
 pprInstr (COMMENT _) = empty -- nuke 'em
 {-
-pprInstr (COMMENT s)
-   =  IF_ARCH_alpha( ((<>) (ptext (sLit "\t# ")) (ftext s))
-     ,IF_ARCH_sparc( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_i386( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_x86_64( ((<>) (ptext (sLit "# "))   (ftext s))
-     ,IF_ARCH_powerpc( IF_OS_linux(
-        ((<>) (ptext (sLit "# ")) (ftext s)),
-        ((<>) (ptext (sLit "; ")) (ftext s)))
-     ,)))))
+pprInstr (COMMENT s) = ptext (sLit "# ") <> ftext s
 -}
 pprInstr (DELTA d)
    = pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d)))



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to