packages feed

llvm-tf-3.0.2: example/Align.hs

module Main (main) where

import LLVM.ExecutionEngine
import LLVM.Core

import Types.Data.Num (D1, D4)

import Data.Word (Word32, Word64)


main :: IO ()
main = do
    -- Initialize jitter
    initializeNativeTarget

    td <- getTargetData
    print (littleEndian td,
           aBIAlignmentOfType td $ typeRef (undefined :: Word32),
           aBIAlignmentOfType td $ typeRef (undefined :: Word64),
	   aBIAlignmentOfType td $ typeRef (undefined :: Vector D4 Float),
	   aBIAlignmentOfType td $ typeRef (undefined :: Vector D1 Double),
	   storeSizeOfType td $ typeRef (undefined :: Vector D4 Float),
           intPtrType td
	   )