llvm-general 3.3.14.3 → 3.3.14.4
raw patch · 6 files changed
+23/−18 lines, 6 filesdep ~llvm-generaldep ~llvm-general-pure
Dependency ranges changed: llvm-general, llvm-general-pure
Files
- LICENSE +1/−1
- llvm-general.cabal +6/−6
- src/LLVM/General/Internal/FFI/TargetC.cpp +5/−5
- src/LLVM/General/Internal/Target.hs +8/−3
- src/LLVM/General/Target.hs +1/−1
- test/LLVM/General/Test/Instrumentation.hs +2/−2
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2013, Benjamin S. Scarlet+Copyright (c) 2013, Benjamin S. Scarlet and Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without
llvm-general.cabal view
@@ -1,10 +1,10 @@ name: llvm-general-version: 3.3.14.3+version: 3.3.14.4 license: BSD3 license-file: LICENSE author: Benjamin S.Scarlet <fgthb0@greynode.net> maintainer: Benjamin S. Scarlet <fgthb0@greynode.net>-copyright: Benjamin S. Scarlet 2013+copyright: (c) 2013 Benjamin S. Scarlet and Google Inc. build-type: Custom stability: experimental cabal-version: >= 1.8@@ -39,7 +39,7 @@ type: git location: git://github.com/bscarlet/llvm-general.git branch: llvm-3.3- tag: v3.3.14.3+ tag: v3.3.14.4 flag shared-llvm description: link against llvm shared rather than static library@@ -64,7 +64,7 @@ parsec >= 3.1.3, array >= 0.4.0.0, setenv >= 0.1.0,- llvm-general-pure == 3.3.14.3+ llvm-general-pure == 3.3.14.4 extra-libraries: stdc++ hs-source-dirs: src extensions:@@ -205,8 +205,8 @@ HUnit >= 1.2.4.2, test-framework-quickcheck2 >= 0.3.0.1, QuickCheck >= 2.5.1.1,- llvm-general == 3.3.14.3,- llvm-general-pure == 3.3.14.3,+ llvm-general == 3.3.14.4,+ llvm-general-pure == 3.3.14.4, containers >= 0.4.2.1, mtl >= 2.1, transformers >= 0.3.0.0,
src/LLVM/General/Internal/FFI/TargetC.cpp view
@@ -139,9 +139,9 @@ } LLVMTargetRef LLVM_General_LookupTarget(- const char *arch, - const char *ctriple, - const char **tripleOut, + const char *arch,+ const char *ctriple,+ const char **tripleOut, const char **cerror ) { std::string error;@@ -243,14 +243,14 @@ triple, cpu, features,- *targetOptions, + *targetOptions, unwrap(relocModel), unwrap(codeModel), unwrap(codeGenOptLevel) ) ); }- + const TargetLowering *LLVM_General_GetTargetLowering(LLVMTargetMachineRef t) { return unwrap(t)->getTargetLowering(); }
src/LLVM/General/Internal/Target.hs view
@@ -272,11 +272,16 @@ initializeAllTargets :: IO () initializeAllTargets = FFI.initializeAllTargets --- | Bracket creation and destruction of a 'TargetMachine' configured for the host+{-# DEPRECATED withDefaultTargetMachine "use withHostTargetMachine or withTargetMachine" #-}+-- | Bracket creation and destruction of a 'TargetMachine' configured for the host. withDefaultTargetMachine :: (TargetMachine -> IO a) -> ExceptT String IO a-withDefaultTargetMachine f = do+withDefaultTargetMachine = withHostTargetMachine++-- | Bracket creation and destruction of a 'TargetMachine' configured for the host+withHostTargetMachine :: (TargetMachine -> IO a) -> ExceptT String IO a+withHostTargetMachine f = do liftIO $ initializeAllTargets- triple <- liftIO $ getDefaultTargetTriple+ triple <- liftIO $ getProcessTargetTriple cpu <- liftIO $ getHostCPUName features <- liftIO $ getHostCPUFeatures (target, _) <- lookupTarget Nothing triple
src/LLVM/General/Target.hs view
@@ -7,7 +7,7 @@ Target, TargetMachine, TargetLowering, CPUFeature(..), withTargetOptions, peekTargetOptions, pokeTargetOptions,- withTargetMachine, withDefaultTargetMachine,+ withTargetMachine, withHostTargetMachine, withDefaultTargetMachine, getTargetLowering, getDefaultTargetTriple, getProcessTargetTriple, getHostCPUName, getHostCPUFeatures, getTargetMachineDataLayout, initializeNativeTarget, initializeAllTargets,
test/LLVM/General/Test/Instrumentation.hs view
@@ -38,7 +38,7 @@ moduleAST mIn' ast = do- dl <- withDefaultTargetMachine getTargetMachineDataLayout+ dl <- withHostTargetMachine getTargetMachineDataLayout return $ Module "<string>" (Just dl) Nothing [ GlobalDefinition $ functionDefaults { G.returnType = i32,@@ -135,7 +135,7 @@ testCase n $ do triple <- getProcessTargetTriple withTargetLibraryInfo triple $ \tli -> do- Right dl <- runExceptT $ withDefaultTargetMachine getTargetMachineDataLayout+ Right dl <- runExceptT $ withHostTargetMachine getTargetMachineDataLayout Right ast <- runExceptT ast ast' <- instrument (defaultPassSetSpec { transforms = [p], dataLayout = Just dl, targetLibraryInfo = Just tli }) ast let names ast = [ n | GlobalDefinition d <- moduleDefinitions ast, Name n <- return (G.name d) ]