[commit: ghc] master: Rename C(obj)cplusplus to C(obj)cxx (e2f1ffc)
git at git.haskell.org
git at git.haskell.org
Sat Mar 28 00:28:16 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e2f1ffc396cb2c2ef754ba80d2907245864c82e9/ghc
>---------------------------------------------------------------
commit e2f1ffc396cb2c2ef754ba80d2907245864c82e9
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Sat Mar 28 01:27:59 2015 +0100
Rename C(obj)cplusplus to C(obj)cxx
Reviewed By: kgardas
Differential Revision: https://phabricator.haskell.org/D763
>---------------------------------------------------------------
e2f1ffc396cb2c2ef754ba80d2907245864c82e9
compiler/main/DriverPhases.hs | 28 ++++++++++++++--------------
compiler/main/DriverPipeline.hs | 9 ++++-----
ghc/Main.hs | 2 +-
3 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs
index 2d7d904..164de4c 100644
--- a/compiler/main/DriverPhases.hs
+++ b/compiler/main/DriverPhases.hs
@@ -111,10 +111,10 @@ data Phase
| Cpp HscSource
| HsPp HscSource
| Hsc HscSource
- | Ccplusplus -- Compile C++
+ | Ccxx -- Compile C++
| Cc -- Compile C
| Cobjc -- Compile Objective-C
- | Cobjcplusplus -- Compile Objective-C++
+ | Cobjcxx -- Compile Objective-C++
| HCc -- Haskellised C (as opposed to vanilla C) compilation
| Splitter -- Assembly file splitter (part of '-split-objs')
| SplitAs -- Assembler for split assembly files (part of '-split-objs')
@@ -161,9 +161,9 @@ eqPhase CmmCpp CmmCpp = True
eqPhase Cmm Cmm = True
eqPhase MergeStub MergeStub = True
eqPhase StopLn StopLn = True
-eqPhase Ccplusplus Ccplusplus = True
-eqPhase Cobjcplusplus Cobjcplusplus = True
-eqPhase _ _ = False
+eqPhase Ccxx Ccxx = True
+eqPhase Cobjcxx Cobjcxx = True
+eqPhase _ _ = False
-- Partial ordering on phases: we want to know which phases will occur before
-- which others. This is used for sanity checking, to ensure that the
@@ -189,10 +189,10 @@ nextPhase dflags p
LlvmMangle -> As False
SplitAs -> MergeStub
As _ -> MergeStub
- Ccplusplus -> As False
+ Ccxx -> As False
Cc -> As False
Cobjc -> As False
- Cobjcplusplus -> As False
+ Cobjcxx -> As False
CmmCpp -> Cmm
Cmm -> maybeHCc
HCc -> As False
@@ -215,13 +215,13 @@ startPhase "hscpp" = HsPp HsSrcFile
startPhase "hspp" = Hsc HsSrcFile
startPhase "hc" = HCc
startPhase "c" = Cc
-startPhase "cpp" = Ccplusplus
+startPhase "cpp" = Ccxx
startPhase "C" = Cc
startPhase "m" = Cobjc
-startPhase "M" = Cobjcplusplus
-startPhase "mm" = Cobjcplusplus
-startPhase "cc" = Ccplusplus
-startPhase "cxx" = Ccplusplus
+startPhase "M" = Cobjcxx
+startPhase "mm" = Cobjcxx
+startPhase "cc" = Ccxx
+startPhase "cxx" = Ccxx
startPhase "split_s" = Splitter
startPhase "s" = As False
startPhase "S" = As True
@@ -247,9 +247,9 @@ phaseInputExt (Hsc _) = "hspp" -- intermediate only
-- because runPipeline uses the StopBefore phase to pick the
-- output filename. That could be fixed, but watch out.
phaseInputExt HCc = "hc"
-phaseInputExt Ccplusplus = "cpp"
+phaseInputExt Ccxx = "cpp"
phaseInputExt Cobjc = "m"
-phaseInputExt Cobjcplusplus = "mm"
+phaseInputExt Cobjcxx = "mm"
phaseInputExt Cc = "c"
phaseInputExt Splitter = "split_s"
phaseInputExt (As True) = "S"
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 845cc95..f949531 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1068,7 +1068,7 @@ runPhase (RealPhase Cmm) input_fn dflags
-- way too many hacks, and I can't say I've ever used it anyway.
runPhase (RealPhase cc_phase) input_fn dflags
- | any (cc_phase `eqPhase`) [Cc, Ccplusplus, HCc, Cobjc, Cobjcplusplus]
+ | any (cc_phase `eqPhase`) [Cc, Ccxx, HCc, Cobjc, Cobjcxx]
= do
let platform = targetPlatform dflags
hcc = cc_phase `eqPhase` HCc
@@ -1137,9 +1137,9 @@ runPhase (RealPhase cc_phase) input_fn dflags
ghcVersionH <- liftIO $ getGhcVersionPathName dflags
- let gcc_lang_opt | cc_phase `eqPhase` Ccplusplus = "c++"
+ let gcc_lang_opt | cc_phase `eqPhase` Ccxx = "c++"
| cc_phase `eqPhase` Cobjc = "objective-c"
- | cc_phase `eqPhase` Cobjcplusplus = "objective-c++"
+ | cc_phase `eqPhase` Cobjcxx = "objective-c++"
| otherwise = "c"
liftIO $ SysTools.runCc dflags (
-- force the C compiler to interpret this file as C when
@@ -1176,8 +1176,7 @@ runPhase (RealPhase cc_phase) input_fn dflags
else [])
-- GCC 4.6+ doesn't like -Wimplicit when compiling C++.
- ++ (if (cc_phase /= Ccplusplus &&
- cc_phase /= Cobjcplusplus)
+ ++ (if (cc_phase /= Ccxx && cc_phase /= Cobjcxx)
then ["-Wimplicit"]
else [])
diff --git a/ghc/Main.hs b/ghc/Main.hs
index a95382f..a91fb26 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -653,7 +653,7 @@ doMake srcs = do
haskellish (f,Nothing) =
looksLikeModuleName f || isHaskellUserSrcFilename f || '.' `notElem` f
haskellish (_,Just phase) =
- phase `notElem` [ As True, As False, Cc, Cobjc, Cobjcplusplus, CmmCpp, Cmm
+ phase `notElem` [ As True, As False, Cc, Cobjc, Cobjcxx, CmmCpp, Cmm
, StopLn]
hsc_env <- GHC.getSession
More information about the ghc-commits
mailing list