[commit: ghc] master: Systools.hs: Improve detection of GCC and Clang (96dc041)
git at git.haskell.org
git at git.haskell.org
Mon Oct 19 21:14:20 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/96dc041a502754da475e38cb84ed2bb0e142d527/ghc
>---------------------------------------------------------------
commit 96dc041a502754da475e38cb84ed2bb0e142d527
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date: Sat Oct 17 19:33:38 2015 +1100
Systools.hs: Improve detection of GCC and Clang
Test Plan: Build on Debian using `--with-gcc=clang`
Reviewers: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1336
GHC Trac Issues: #10981
>---------------------------------------------------------------
96dc041a502754da475e38cb84ed2bb0e142d527
compiler/main/SysTools.hs | 4 ++--
compiler/rename/RnNames.hs | 2 +-
compiler/typecheck/TcExpr.hs | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 1a1d4b5..108aba7 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -881,10 +881,10 @@ getCompilerInfo' dflags = do
-- Try to grab the info from the process output.
parseCompilerInfo _stdo stde _exitc
-- Regular GCC
- | any ("gcc version" `isPrefixOf`) stde =
+ | any ("gcc version" `isInfixOf`) stde =
return GCC
-- Regular clang
- | any ("clang version" `isPrefixOf`) stde =
+ | any ("clang version" `isInfixOf`) stde =
return Clang
-- XCode 5.1 clang
| any ("Apple LLVM version 5.1" `isPrefixOf`) stde =
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index c371d47..b517ce1 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -959,7 +959,7 @@ trimAvail :: AvailInfo -> Name -> AvailInfo
trimAvail (Avail n) _ = Avail n
trimAvail (AvailTC n ns fs) m = case find ((== m) . flSelector) fs of
Just x -> AvailTC n [] [x]
- Nothing -> ASSERT (m `elem` ns) AvailTC n [m] []
+ Nothing -> ASSERT(m `elem` ns) AvailTC n [m] []
-- | filters 'AvailInfo's by the given predicate
filterAvails :: (Name -> Bool) -> [AvailInfo] -> [AvailInfo]
diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index 1bdb193..e6cc5d1 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -1451,7 +1451,7 @@ disambiguateRecordBinds record_expr rbnds res_ty
lookupParent :: GlobalRdrElt -> RnM (TyCon, GlobalRdrElt)
lookupParent gre = do { id <- tcLookupId (gre_name gre)
- ; ASSERT (isRecordSelector id)
+ ; ASSERT(isRecordSelector id)
return (recordSelectorTyCon id, gre) }
-- Make all the fields unambiguous by choosing the given parent.
More information about the ghc-commits
mailing list