summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-03-28 01:27:59 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2015-03-28 01:28:04 +0100
commite2f1ffc396cb2c2ef754ba80d2907245864c82e9 (patch)
tree8674c258549a373bec23365baa00510aec2d79d7
parentabde5da4dee5f3b83264f8471e458b20d04f8b29 (diff)
downloadhaskell-e2f1ffc396cb2c2ef754ba80d2907245864c82e9.tar.gz
Rename C(obj)cplusplus to C(obj)cxx
Reviewed By: kgardas Differential Revision: https://phabricator.haskell.org/D763
-rw-r--r--compiler/main/DriverPhases.hs28
-rw-r--r--compiler/main/DriverPipeline.hs9
-rw-r--r--ghc/Main.hs2
3 files changed, 19 insertions, 20 deletions
diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs
index 2d7d90481a..164de4c75a 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 845cc958e7..f94953126b 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 a95382fb0d..a91fb26af7 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