module LLVM.Internal.CommandLine where
import LLVM.Prelude
import Control.Monad.AnyCont
import Control.Monad.IO.Class
import Foreign.Ptr
import qualified LLVM.Internal.FFI.CommandLine as FFI
import LLVM.Internal.Coding
import LLVM.Internal.String ()
parseCommandLineOptions :: [ShortByteString] -> Maybe ShortByteString -> IO ()
parseCommandLineOptions args overview = flip runAnyContT return $ do
args <- encodeM args
overview <- maybe (return nullPtr) encodeM overview
liftIO $ FFI.parseCommandLineOptions args overview