diff --git a/cbits/support.cpp b/cbits/support.cpp
--- a/cbits/support.cpp
+++ b/cbits/support.cpp
@@ -14,7 +14,11 @@
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Operator.h"
+#if HS_LLVM_VERSION < 1700
 #include "llvm/Support/Host.h"
+#else
+#include "llvm/TargetParser/Host.h"
+#endif
 
 #include "support.h"
 
diff --git a/example/Host.hs b/example/Host.hs
--- a/example/Host.hs
+++ b/example/Host.hs
@@ -6,8 +6,8 @@
 import Common (getString, createExecutionEngine)
 
 import qualified LLVM.FFI.ExecutionEngine as EE
+import qualified LLVM.FFI.TargetMachine as TargetMachine
 import qualified LLVM.FFI.Target as Target
-import qualified LLVM.FFI.Support.Host as Host
 import qualified LLVM.FFI.Core as LLVM
 import qualified LLVM.Target.Native as Native
 
@@ -20,7 +20,7 @@
 main = do
    Native.initializeNativeTarget
 
-   putStrLn =<< getString Host.getHostCPUName
+   putStrLn =<< getString TargetMachine.getHostCPUName
    putStrLn LLVM.hostTriple
 
    modul <- withCString "host" LLVM.moduleCreateWithName
diff --git a/example/JIT.hs b/example/JIT.hs
--- a/example/JIT.hs
+++ b/example/JIT.hs
@@ -1,7 +1,8 @@
 {-# LANGUAGE ForeignFunctionInterface #-}
 {- |
 This program has two purposes:
-First a minimalistic demonstration of how to generate and run code with LLVM.
+First a minimalistic demonstration of
+how to generate and run and optimize code with LLVM.
 Second a test program that forces to run the linker.
 It let us check whether Haskell bindings match C functions.
 -}
@@ -9,22 +10,26 @@
 
 import Common (withArrayLen, createExecutionEngine)
 
-import qualified LLVM.FFI.Transforms.PassManagerBuilder as PMB
-import qualified LLVM.FFI.Transforms.Scalar as Transform
+import qualified LLVM.FFI.Transforms.PassBuilder as PB
+import qualified LLVM.FFI.TargetMachine as TM
+import qualified LLVM.FFI.Error as Error
 import qualified LLVM.FFI.ExecutionEngine as EE
 import qualified LLVM.FFI.BitWriter as BW
 import qualified LLVM.FFI.Core as Core
 import qualified LLVM.Target.Native as Native
 
-import qualified Foreign.C.String as CStr
+import qualified System.IO as IO
+import System.Exit (exitFailure)
+
 import qualified Foreign.Marshal.Array as Array
 import qualified Foreign.Marshal.Alloc as Alloc
+import qualified Foreign.C.String as CStr
 import Foreign.C.String (withCString)
 import Foreign.C.Types (CFloat)
-import Foreign.Storable (sizeOf)
-import Foreign.Ptr (Ptr, FunPtr)
+import Foreign.Storable (peek, sizeOf)
+import Foreign.Ptr (Ptr, FunPtr, nullPtr)
 
-import Control.Exception (bracket, bracket_)
+import Control.Exception (bracket)
 import Control.Monad (when, void)
 
 import Data.Tuple.HT (mapSnd)
@@ -44,6 +49,16 @@
 
 
 
+die :: String -> IO a
+die msg = do
+   IO.hPutStrLn IO.stderr msg
+   exitFailure
+
+exitFromError :: Ptr CStr.CString -> IO a
+exitFromError errorRef =
+   bracket (peek errorRef) Alloc.free $ \errorMsg ->
+      CStr.peekCString errorMsg >>= die
+
 main :: IO ()
 main = do
    Native.initializeNativeTarget
@@ -107,21 +122,46 @@
    void $ withCString "round-avx.bc" $ BW.writeBitcodeToFile modul
 
    when True $
-      bracket Core.createPassManager Core.disposePassManager $ \mpasses ->
-      bracket (Core.createFunctionPassManagerForModule modul)
-            Core.disposePassManager $ \fpasses -> do
-         Transform.addVerifierPass mpasses
+      withCString Core.hostTriple $ \triple ->
+      (\cont -> do
+         target <-
+            Alloc.alloca $ \targetRef ->
+            Alloc.alloca $ \errorRef -> do
+               failure <- TM.getTargetFromTriple triple targetRef errorRef
+               if Core.deconsBool failure
+                  then exitFromError errorRef
+                  else peek targetRef
+         cpu <- TM.getHostCPUName
+         cont target cpu) $ \target cpu ->
 
-         bracket PMB.create PMB.dispose $ \passBuilder -> do
-            PMB.setOptLevel passBuilder 3
-            PMB.populateFunctionPassManager passBuilder fpasses
-            PMB.populateModulePassManager passBuilder mpasses
+      withCString "" $ \features ->
 
-         bracket_
-            (Core.initializeFunctionPassManager fpasses)
-            (Core.finalizeFunctionPassManager fpasses)
-            (void $ Core.runFunctionPassManager fpasses func)
-         void $ Core.runPassManager mpasses modul
+      bracket
+         (TM.createTargetMachine target triple cpu features
+            TM.codeGenLevelDefault TM.relocDefault TM.codeModelDefault)
+         TM.disposeTargetMachine $
+            \tm ->
+
+      bracket PB.createPassBuilderOptions PB.disposePassBuilderOptions $
+            \pbOpt ->
+
+      withCString "default<O2>" $ \passName -> do
+         PB.passBuilderOptionsSetVerifyEach pbOpt Core.true
+         do
+            errorRef <- PB.runPasses modul passName tm pbOpt
+            when (errorRef /= nullPtr) $
+               bracket
+                  (Error.getErrorMessage errorRef)
+                  Error.disposeErrorMessage
+                     $ \errorMsg ->
+                  CStr.peekCString errorMsg >>= die
+         withCString "round-avx-opt.s" $ \path ->
+            Alloc.alloca $ \errorRef -> do
+               failure <-
+                  TM.targetMachineEmitToFile
+                     tm modul path TM.assemblyFile errorRef
+               when (Core.deconsBool failure) $
+                  exitFromError errorRef
 
          void $ withCString "round-avx-opt.bc" $ BW.writeBitcodeToFile modul
 
diff --git a/llvm-ffi.cabal b/llvm-ffi.cabal
--- a/llvm-ffi.cabal
+++ b/llvm-ffi.cabal
@@ -1,6 +1,6 @@
 Cabal-Version: 2.2
 Name:          llvm-ffi
-Version:       16.0
+Version:       17.0
 License:       BSD-3-Clause
 License-File:  LICENSE
 Synopsis:      FFI bindings to the LLVM compiler toolkit.
@@ -17,29 +17,57 @@
   to the LLVM installation directories manually.
   It is recommended to add options to your global @.cabal/config@:
   .
-  > extra-include-dirs: /usr/lib/llvm-16/include
-  > extra-lib-dirs: /usr/lib/llvm-16/lib
+  > extra-include-dirs: /usr/lib/llvm-17/include
+  > extra-lib-dirs: /usr/lib/llvm-17/lib
   .
   This works for both @v1-build@ and @v2-build@.
   The shown paths work for Debian and Ubuntu
   using the LLVM repositories at <https://apt.llvm.org/>.
   You can obtain them with
   .
-  > llvm-config-16 --includedir --libdir
+  > llvm-config-17 --includedir --libdir
   .
   You can choose specific LLVM versions per project.
   For @v1-builds@ it works like so:
   .
-  > cabal install -fllvm900 --extra-include-dirs=$(llvm-config-9 --includedir) --extra-lib-dirs=$(llvm-config-9 --libdir) yourpackage
+  > cabal install -fllvm1300 --extra-include-dirs=$(llvm-config-13 --includedir) --extra-lib-dirs=$(llvm-config-13 --libdir) yourpackage
   .
   For Nix-style build you must add some options
   to the @cabal.project.local@ file of your LLVM-related project:
   .
   > package llvm-ffi
-  >   flags: +llvm900
-  >   extra-include-dirs: /usr/lib/llvm-9/include
-  >   extra-lib-dirs: /usr/lib/llvm-9/lib
+  >   flags: +llvm1300
+  >   extra-include-dirs: /usr/lib/llvm-13/include
+  >   extra-lib-dirs: /usr/lib/llvm-13/lib
   .
+  Alternatively, you may set environment variables globally or locally:
+  .
+  > export CPATH=/usr/lib/llvm-17/include:$CPATH
+  > export C_INCLUDE_PATH=/usr/lib/llvm-17/include:$C_INCLUDE_PATH
+  > export LD_LIBRARY_PATH=/usr/lib/llvm-17/lib:$LD_LIBRARY_PATH
+  .
+  You can install and make LLVM library available
+  in an elegant way using Nix:
+  .
+  > nix-shell -p llvmPackages_17.libllvm
+  .
+  Though, for compatibility of GHC with LLVM and GLIBC
+  you will need to use more packages from Nix
+  and you better use a @shell.nix@ file for bundling those:
+  .
+  > let
+  >   pkgs = import <nixpkgs> {};
+  > in
+  > pkgs.mkShell {
+  >   nativeBuildInputs = (with pkgs; [
+  >     gnumake
+  >     pkg-config
+  >     ghc
+  >     cabal-install
+  >     llvmPackages_17.libllvm
+  >   ]);
+  > }
+  .
   The second way uses @pkg-config@.
   You can store above paths permanently in a @pkg-config@ file like @llvm.pc@.
   The optimal way would be if LLVM installations or GNU/Linux distributions
@@ -51,7 +79,7 @@
   > cabal install -fpkgConfig
   .
   We try to stay up to date with LLVM releases.
-  The current version of this package is compatible with LLVM 8-16.
+  The current version of this package is compatible with LLVM 13-17.
   Please understand that the package may or may not work
   against older LLVM releases.
   .
@@ -110,56 +138,6 @@
   Manual: True
   Default: True
 
-Flag llvm309
-  Description: use LLVM-3.9 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm400
-  Description: use LLVM-4.0 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm500
-  Description: use LLVM-5.0 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm600
-  Description: use LLVM-6.0 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm700
-  Description: use LLVM-7 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm800
-  Description: use LLVM-8 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm900
-  Description: use LLVM-9 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm1000
-  Description: use LLVM-10 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm1100
-  Description: use LLVM-11 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
-Flag llvm1200
-  Description: use LLVM-12 instead of latest supported LLVM
-  Manual: True
-  Default: False
-
 Flag llvm1300
   Description: use LLVM-13 instead of latest supported LLVM
   Manual: True
@@ -175,12 +153,17 @@
   Manual: True
   Default: False
 
+Flag llvm1600
+  Description: use LLVM-16 instead of latest supported LLVM
+  Manual: True
+  Default: False
+
 Source-Repository head
   Type:     darcs
   Location: https://hub.darcs.net/thielema/llvm-ffi/
 
 Source-Repository this
-  Tag:      16.0
+  Tag:      17.0
   Type:     darcs
   Location: https://hub.darcs.net/thielema/llvm-ffi/
 
@@ -202,13 +185,12 @@
       LLVM.FFI.BitWriter
       LLVM.FFI.Core
       LLVM.FFI.Core.Attribute
+      LLVM.FFI.Error
       LLVM.FFI.ExecutionEngine
       LLVM.FFI.Support.Host
       LLVM.FFI.Target
-      LLVM.FFI.Transforms.IPO
-      LLVM.FFI.Transforms.PassManagerBuilder
-      LLVM.FFI.Transforms.Scalar
-      LLVM.FFI.Transforms.Vectorize
+      LLVM.FFI.TargetMachine
+      LLVM.FFI.Transforms.PassBuilder
       LLVM.Target.Native
 
   Other-modules:
@@ -226,196 +208,77 @@
       LLVM.Raw.Core
       LLVM.FFI.Core14
 
-  If flag(llvm309)
+  If flag(llvm1300)
     If flag(pkgConfig)
       If flag(specificPkgConfig)
-        PkgConfig-Depends: llvm-3.9
+        PkgConfig-Depends: llvm-13
       Else
-        PkgConfig-Depends: llvm == 3.9.*
+        PkgConfig-Depends: llvm == 13.*
     Else
-      Extra-Libraries: LLVM-3.9
-    Hs-Source-Dirs: src/3.9, src/before14
-    CC-Options: -DHS_LLVM_VERSION=309
-    Cxx-Options: -DHS_LLVM_VERSION=309
-    CPP-Options: -DHS_LLVM_VERSION=309
+      Extra-Libraries: LLVM-13
+    Hs-Source-Dirs: src/13, src/before14
+    CC-Options: -DHS_LLVM_VERSION=1300
+    Cxx-Options: -DHS_LLVM_VERSION=1300
+    CPP-Options: -DHS_LLVM_VERSION=1300
   Else
-    If flag(llvm400)
+    Hs-Source-Dirs: src/from14
+    If flag(llvm1400)
       If flag(pkgConfig)
         If flag(specificPkgConfig)
-          PkgConfig-Depends: llvm-4.0
+          PkgConfig-Depends: llvm-14
         Else
-          PkgConfig-Depends: llvm == 4.0.*
+          PkgConfig-Depends: llvm == 14.*
       Else
-        Extra-Libraries: LLVM-4.0
-      Hs-Source-Dirs: src/4.0, src/before14
-      CC-Options: -DHS_LLVM_VERSION=400
-      Cxx-Options: -DHS_LLVM_VERSION=400
-      CPP-Options: -DHS_LLVM_VERSION=400
+        Extra-Libraries: LLVM-14
+      Hs-Source-Dirs: src/14
+      CC-Options: -DHS_LLVM_VERSION=1400
+      Cxx-Options: -DHS_LLVM_VERSION=1400
+      CPP-Options: -DHS_LLVM_VERSION=1400
     Else
-      If flag(llvm500)
+      If flag(llvm1500)
         If flag(pkgConfig)
           If flag(specificPkgConfig)
-            PkgConfig-Depends: llvm-5.0
+            PkgConfig-Depends: llvm-15
           Else
-            PkgConfig-Depends: llvm == 5.0.*
+            PkgConfig-Depends: llvm == 15.*
         Else
-          Extra-Libraries: LLVM-5.0
-        Hs-Source-Dirs: src/5.0, src/before14
-        CC-Options: -DHS_LLVM_VERSION=500
-        Cxx-Options: -DHS_LLVM_VERSION=500
-        CPP-Options: -DHS_LLVM_VERSION=500
+          Extra-Libraries: LLVM-15
+        Hs-Source-Dirs: src/15
+        CC-Options: -DHS_LLVM_VERSION=1500
+        Cxx-Options: -DHS_LLVM_VERSION=1500
+        CPP-Options: -DHS_LLVM_VERSION=1500
       Else
-        If flag(llvm600)
+        Cxx-Options: -std=c++17
+        If flag(llvm1600)
           If flag(pkgConfig)
             If flag(specificPkgConfig)
-              PkgConfig-Depends: llvm-6.0
+              PkgConfig-Depends: llvm-16
             Else
-              PkgConfig-Depends: llvm == 6.0.*
+              PkgConfig-Depends: llvm == 16.*
           Else
-            Extra-Libraries: LLVM-6.0
-          Hs-Source-Dirs: src/6.0, src/before14
-          CC-Options: -DHS_LLVM_VERSION=600
-          Cxx-Options: -DHS_LLVM_VERSION=600
-          CPP-Options: -DHS_LLVM_VERSION=600
+            Extra-Libraries: LLVM-16
+          Hs-Source-Dirs: src/16
+          CC-Options: -DHS_LLVM_VERSION=1600
+          Cxx-Options: -DHS_LLVM_VERSION=1600
+          CPP-Options: -DHS_LLVM_VERSION=1600
         Else
-          If flag(llvm700)
-            If flag(pkgConfig)
-              If flag(specificPkgConfig)
-                PkgConfig-Depends: llvm-7
-              Else
-                PkgConfig-Depends: llvm == 7.*
+          If flag(pkgConfig)
+            If flag(specificPkgConfig)
+              PkgConfig-Depends: llvm-17
             Else
-              Extra-Libraries: LLVM-7
-            Hs-Source-Dirs: src/7, src/before14
-            CC-Options: -DHS_LLVM_VERSION=700
-            Cxx-Options: -DHS_LLVM_VERSION=700
-            CPP-Options: -DHS_LLVM_VERSION=700
+              PkgConfig-Depends: llvm == 17.*
           Else
-            If flag(llvm800)
-              If flag(pkgConfig)
-                If flag(specificPkgConfig)
-                  PkgConfig-Depends: llvm-8
-                Else
-                  PkgConfig-Depends: llvm == 8.*
-              Else
-                Extra-Libraries: LLVM-8
-              Hs-Source-Dirs: src/8, src/before14
-              CC-Options: -DHS_LLVM_VERSION=800
-              Cxx-Options: -DHS_LLVM_VERSION=800
-              CPP-Options: -DHS_LLVM_VERSION=800
-            Else
-              If flag(llvm900)
-                If flag(pkgConfig)
-                  If flag(specificPkgConfig)
-                    PkgConfig-Depends: llvm-9
-                  Else
-                    PkgConfig-Depends: llvm == 9.*
-                Else
-                  Extra-Libraries: LLVM-9
-                Hs-Source-Dirs: src/9, src/before14
-                CC-Options: -DHS_LLVM_VERSION=900
-                Cxx-Options: -DHS_LLVM_VERSION=900
-                CPP-Options: -DHS_LLVM_VERSION=900
-              Else
-                -- taken from llvm-config --cxxflags
-                Cxx-Options: -std=c++14
-                If flag(llvm1000)
-                  If flag(pkgConfig)
-                    If flag(specificPkgConfig)
-                      PkgConfig-Depends: llvm-10
-                    Else
-                      PkgConfig-Depends: llvm == 10.*
-                  Else
-                    Extra-Libraries: LLVM-10
-                  Hs-Source-Dirs: src/10, src/before14
-                  CC-Options: -DHS_LLVM_VERSION=1000
-                  Cxx-Options: -DHS_LLVM_VERSION=1000
-                  CPP-Options: -DHS_LLVM_VERSION=1000
-                Else
-                  If flag(llvm1100)
-                    If flag(pkgConfig)
-                      If flag(specificPkgConfig)
-                        PkgConfig-Depends: llvm-11
-                      Else
-                        PkgConfig-Depends: llvm == 11.*
-                    Else
-                      Extra-Libraries: LLVM-11
-                    Hs-Source-Dirs: src/11, src/before14
-                    CC-Options: -DHS_LLVM_VERSION=1100
-                    Cxx-Options: -DHS_LLVM_VERSION=1100
-                    CPP-Options: -DHS_LLVM_VERSION=1100
-                  Else
-                    If flag(llvm1200)
-                      If flag(pkgConfig)
-                        If flag(specificPkgConfig)
-                          PkgConfig-Depends: llvm-12
-                        Else
-                          PkgConfig-Depends: llvm == 12.*
-                      Else
-                        Extra-Libraries: LLVM-12
-                      Hs-Source-Dirs: src/12, src/before14
-                      CC-Options: -DHS_LLVM_VERSION=1200
-                      Cxx-Options: -DHS_LLVM_VERSION=1200
-                      CPP-Options: -DHS_LLVM_VERSION=1200
-                    Else
-                      If flag(llvm1300)
-                        If flag(pkgConfig)
-                          If flag(specificPkgConfig)
-                            PkgConfig-Depends: llvm-13
-                          Else
-                            PkgConfig-Depends: llvm == 13.*
-                        Else
-                          Extra-Libraries: LLVM-13
-                        Hs-Source-Dirs: src/13, src/before14
-                        CC-Options: -DHS_LLVM_VERSION=1300
-                        Cxx-Options: -DHS_LLVM_VERSION=1300
-                        CPP-Options: -DHS_LLVM_VERSION=1300
-                      Else
-                        Hs-Source-Dirs: src/from14
-                        If flag(llvm1400)
-                          If flag(pkgConfig)
-                            If flag(specificPkgConfig)
-                              PkgConfig-Depends: llvm-14
-                            Else
-                              PkgConfig-Depends: llvm == 14.*
-                          Else
-                            Extra-Libraries: LLVM-14
-                          Hs-Source-Dirs: src/14
-                          CC-Options: -DHS_LLVM_VERSION=1400
-                          Cxx-Options: -DHS_LLVM_VERSION=1400
-                          CPP-Options: -DHS_LLVM_VERSION=1400
-                        Else
-                          If flag(llvm1500)
-                            If flag(pkgConfig)
-                              If flag(specificPkgConfig)
-                                PkgConfig-Depends: llvm-15
-                              Else
-                                PkgConfig-Depends: llvm == 15.*
-                            Else
-                              Extra-Libraries: LLVM-15
-                            Hs-Source-Dirs: src/15
-                            CC-Options: -DHS_LLVM_VERSION=1500
-                            Cxx-Options: -DHS_LLVM_VERSION=1500
-                            CPP-Options: -DHS_LLVM_VERSION=1500
-                          Else
-                            Cxx-Options: -std=c++17
-                            If flag(pkgConfig)
-                              If flag(specificPkgConfig)
-                                PkgConfig-Depends: llvm-16
-                              Else
-                                PkgConfig-Depends: llvm == 16.*
-                            Else
-                              Extra-Libraries: LLVM-16
-                            Hs-Source-Dirs: src/16
-                            CC-Options: -DHS_LLVM_VERSION=1600
-                            Cxx-Options: -DHS_LLVM_VERSION=1600
-                            CPP-Options: -DHS_LLVM_VERSION=1600
+            Extra-Libraries: LLVM-17
+          Hs-Source-Dirs: src/17
+          CC-Options: -DHS_LLVM_VERSION=1700
+          Cxx-Options: -DHS_LLVM_VERSION=1700
+          CPP-Options: -DHS_LLVM_VERSION=1700
 
   CC-Options: -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1
   CPP-Options: -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
   Include-Dirs: include
   Extra-Libraries: stdc++
-  Cxx-Options: -std=c++0x -std=c++11
+  Cxx-Options: -std=c++0x -std=c++14
   Cxx-Sources:
     cbits/support.cpp
 
diff --git a/src/10/LLVM/Raw/Core.hsc b/src/10/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/10/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1939 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
-    :: ContextRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
-    :: ContextRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
-    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
-    :: ValueRef -> CUInt -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
-    :: (Ptr ValueMetadataEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMLookupIntrinsicID" lookupIntrinsicID
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
-    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
-    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
-    :: CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
-    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
-    :: CUInt -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobalIFunc" addGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> TypeRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalIFunc" getNamedGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalIFunc" getFirstGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalIFunc" getLastGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalIFunc" getNextGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalIFunc" getPreviousGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalIFuncResolver" getGlobalIFuncResolver
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetGlobalIFuncResolver" setGlobalIFuncResolver
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMEraseGlobalIFunc" eraseGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveGlobalIFunc" removeGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext2" mDStringInContext2
-    :: ContextRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext2" mDNodeInContext2
-    :: ContextRef -> (Ptr MetadataRef) -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertExistingBasicBlockAfterInsertBlock" insertExistingBasicBlockAfterInsertBlock
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAppendExistingBasicBlock" appendExistingBasicBlock
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
-    :: ContextRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation2" getCurrentDebugLocation2
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation2" setCurrentDebugLocation2
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuilderGetDefaultFPMathTag" builderGetDefaultFPMathTag
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMBuilderSetDefaultFPMathTag" builderSetDefaultFPMathTag
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetWeak" getWeak
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetWeak" setWeak
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetAtomicRMWBinOp" getAtomicRMWBinOp
-    :: ValueRef -> IO AtomicRMWBinOp
-
-foreign import ccall unsafe "LLVMSetAtomicRMWBinOp" setAtomicRMWBinOp
-    :: ValueRef -> AtomicRMWBinOp -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
-    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall2" buildCall2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFreeze" buildFreeze
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/11/LLVM/Raw/Core.hsc b/src/11/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/11/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1954 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
-    :: ContextRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
-    :: ContextRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
-    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMBFloatTypeInContext" bFloatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMBFloatType" bFloatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
-    :: ValueRef -> CUInt -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
-    :: (Ptr ValueMetadataEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMLookupIntrinsicID" lookupIntrinsicID
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
-    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
-    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
-    :: CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
-    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
-    :: CUInt -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobalIFunc" addGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> TypeRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalIFunc" getNamedGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalIFunc" getFirstGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalIFunc" getLastGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalIFunc" getNextGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalIFunc" getPreviousGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalIFuncResolver" getGlobalIFuncResolver
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetGlobalIFuncResolver" setGlobalIFuncResolver
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMEraseGlobalIFunc" eraseGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveGlobalIFunc" removeGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext2" mDStringInContext2
-    :: ContextRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext2" mDNodeInContext2
-    :: ContextRef -> (Ptr MetadataRef) -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertExistingBasicBlockAfterInsertBlock" insertExistingBasicBlockAfterInsertBlock
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAppendExistingBasicBlock" appendExistingBasicBlock
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
-    :: ContextRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation2" getCurrentDebugLocation2
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation2" setCurrentDebugLocation2
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuilderGetDefaultFPMathTag" builderGetDefaultFPMathTag
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMBuilderSetDefaultFPMathTag" builderSetDefaultFPMathTag
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetWeak" getWeak
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetWeak" setWeak
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetAtomicRMWBinOp" getAtomicRMWBinOp
-    :: ValueRef -> IO AtomicRMWBinOp
-
-foreign import ccall unsafe "LLVMSetAtomicRMWBinOp" setAtomicRMWBinOp
-    :: ValueRef -> AtomicRMWBinOp -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
-    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall2" buildCall2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFreeze" buildFreeze
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumMaskElements" getNumMaskElements
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetUndefMaskElem" getUndefMaskElem
-    :: IO CInt
-
-foreign import ccall unsafe "LLVMGetMaskValue" getMaskValue
-    :: ValueRef -> CUInt -> IO CInt
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/12/LLVM/Raw/Core.hsc b/src/12/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/12/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1981 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
-    :: ContextRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
-    :: ContextRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateTypeAttribute" createTypeAttribute
-    :: ContextRef -> CUInt -> TypeRef -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetTypeAttributeValue" getTypeAttributeValue
-    :: AttributeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsTypeAttribute" isTypeAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeByName2" getTypeByName2
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
-    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMBFloatTypeInContext" bFloatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMBFloatType" bFloatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMScalableVectorType" scalableVectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86AMXTypeInContext" x86AMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86AMXType" x86AMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsPoison" isPoison
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPoison" getPoison
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
-    :: ValueRef -> CUInt -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
-    :: (Ptr ValueMetadataEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMLookupIntrinsicID" lookupIntrinsicID
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
-    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
-    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
-    :: CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
-    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
-    :: CUInt -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobalIFunc" addGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> TypeRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalIFunc" getNamedGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalIFunc" getFirstGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalIFunc" getLastGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalIFunc" getNextGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalIFunc" getPreviousGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalIFuncResolver" getGlobalIFuncResolver
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetGlobalIFuncResolver" setGlobalIFuncResolver
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMEraseGlobalIFunc" eraseGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveGlobalIFunc" removeGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext2" mDStringInContext2
-    :: ContextRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext2" mDNodeInContext2
-    :: ContextRef -> (Ptr MetadataRef) -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertExistingBasicBlockAfterInsertBlock" insertExistingBasicBlockAfterInsertBlock
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAppendExistingBasicBlock" appendExistingBasicBlock
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
-    :: ContextRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation2" getCurrentDebugLocation2
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation2" setCurrentDebugLocation2
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuilderGetDefaultFPMathTag" builderGetDefaultFPMathTag
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMBuilderSetDefaultFPMathTag" builderSetDefaultFPMathTag
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetWeak" getWeak
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetWeak" setWeak
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetAtomicRMWBinOp" getAtomicRMWBinOp
-    :: ValueRef -> IO AtomicRMWBinOp
-
-foreign import ccall unsafe "LLVMSetAtomicRMWBinOp" setAtomicRMWBinOp
-    :: ValueRef -> AtomicRMWBinOp -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
-    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall2" buildCall2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFreeze" buildFreeze
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumMaskElements" getNumMaskElements
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetUndefMaskElem" getUndefMaskElem
-    :: IO CInt
-
-foreign import ccall unsafe "LLVMGetMaskValue" getMaskValue
-    :: ValueRef -> CUInt -> IO CInt
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/17/LLVM/Raw/Core.hsc b/src/17/LLVM/Raw/Core.hsc
new file mode 100644
--- /dev/null
+++ b/src/17/LLVM/Raw/Core.hsc
@@ -0,0 +1,1972 @@
+{-# LANGUAGE Safe #-}
+{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE EmptyDataDecls #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+module LLVM.Raw.Core where
+
+import qualified LLVM.FFI.Base as LLVM
+
+import qualified Foreign.C.Types as C
+import Foreign.C.String (CString)
+import Foreign.Ptr (Ptr, FunPtr)
+
+import Data.Typeable (Typeable)
+
+import Data.Word (Word8, Word32, Word64)
+
+
+type CDouble  = C.CDouble
+type CInt     = C.CInt
+type CUInt    = C.CUInt
+type CLLong   = C.CLLong
+type CULLong  = C.CULLong
+type CSize    = C.CSize
+
+
+#include <llvm/Config/llvm-config.h>
+#include <llvm-c/Core.h>
+
+
+data Module
+    deriving (Typeable)
+type ModuleRef = Ptr Module
+
+data ModuleProvider
+    deriving (Typeable)
+type ModuleProviderRef = Ptr ModuleProvider
+
+data Type
+    deriving (Typeable)
+type TypeRef = Ptr Type
+
+data BasicBlock
+    deriving (Typeable)
+type BasicBlockRef = Ptr BasicBlock
+
+data Value
+    deriving (Typeable)
+type ValueRef = Ptr Value
+
+data OpaqueUse
+    deriving (Typeable)
+type UseRef = Ptr OpaqueUse
+
+data Builder
+    deriving (Typeable)
+type BuilderRef = Ptr Builder
+
+data MemoryBuffer
+    deriving (Typeable)
+type MemoryBufferRef = Ptr MemoryBuffer
+
+data PassManager
+    deriving (Typeable)
+type PassManagerRef = Ptr PassManager
+
+data PassRegistry
+    deriving (Typeable)
+type PassRegistryRef = Ptr PassRegistry
+
+data Context
+    deriving (Typeable)
+type ContextRef = Ptr Context
+
+{-
+data Attribute
+    deriving (Typeable)
+-}
+-- until 3.9
+newtype Attribute = Attribute Word32
+type AttributeRef = Ptr Attribute
+
+newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
+
+attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
+attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
+attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
+
+
+data Metadata
+    deriving (Typeable)
+type MetadataRef = Ptr Metadata
+
+data DiagnosticInfo
+    deriving (Typeable)
+type DiagnosticInfoRef = Ptr DiagnosticInfo
+
+data NamedMDNode
+    deriving (Typeable)
+type NamedMDNodeRef = Ptr NamedMDNode
+
+
+data ModuleFlagEntry
+    deriving (Typeable)
+data ValueMetadataEntry
+    deriving (Typeable)
+
+type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
+type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
+
+newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
+
+newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
+newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
+newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
+newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
+-- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
+newtype InlineAsmDialect = InlineAsmDialect Word32
+newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
+newtype Linkage = Linkage #{type LLVMLinkage}
+-- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
+newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
+newtype Opcode = Opcode #{type LLVMOpcode}
+newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
+newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
+newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
+-- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
+newtype UnnamedAddr = UnnamedAddr Word32
+newtype ValueKind = ValueKind #{type LLVMValueKind}
+newtype Visibility = Visibility #{type LLVMVisibility}
+
+
+foreign import ccall unsafe "LLVMShutdown" shutdown
+    :: IO ()
+
+foreign import ccall unsafe "LLVMGetVersion" getVersion
+    :: (Ptr CUInt) -> (Ptr CUInt) -> (Ptr CUInt) -> IO ()
+
+foreign import ccall unsafe "LLVMCreateMessage" createMessage
+    :: CString -> IO CString
+
+foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
+    :: CString -> IO ()
+
+foreign import ccall unsafe "LLVMContextCreate" contextCreate
+    :: IO ContextRef
+
+foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
+    :: IO ContextRef
+
+foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
+    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
+
+foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
+    :: ContextRef -> IO DiagnosticHandler
+
+foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
+    :: ContextRef -> IO (Ptr ())
+
+foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
+    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
+
+foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
+    :: ContextRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
+    :: ContextRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMContextDispose" contextDispose
+    :: ContextRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
+    :: DiagnosticInfoRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
+    :: DiagnosticInfoRef -> IO DiagnosticSeverity
+
+foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
+    :: ContextRef -> CString -> CUInt -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
+    :: CString -> CUInt -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
+    :: CString -> CSize -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
+    :: IO CUInt
+
+foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
+    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
+    :: AttributeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
+    :: AttributeRef -> IO Word64
+
+foreign import ccall unsafe "LLVMCreateTypeAttribute" createTypeAttribute
+    :: ContextRef -> CUInt -> TypeRef -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMGetTypeAttributeValue" getTypeAttributeValue
+    :: AttributeRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
+    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
+    :: AttributeRef -> (Ptr CUInt) -> IO CString
+
+foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
+    :: AttributeRef -> (Ptr CUInt) -> IO CString
+
+foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
+    :: AttributeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
+    :: AttributeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsTypeAttribute" isTypeAttribute
+    :: AttributeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetTypeByName2" getTypeByName2
+    :: ContextRef -> CString -> IO TypeRef
+
+foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
+    :: CString -> IO ModuleRef
+
+foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
+    :: CString -> ContextRef -> IO ModuleRef
+
+foreign import ccall unsafe "LLVMCloneModule" cloneModule
+    :: ModuleRef -> IO ModuleRef
+
+foreign import ccall unsafe "LLVMDisposeModule" disposeModule
+    :: ModuleRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
+    :: ModuleRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
+    :: ModuleRef -> CString -> CSize -> IO ()
+
+foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
+    :: ModuleRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
+    :: ModuleRef -> CString -> CSize -> IO ()
+
+foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
+    :: ModuleRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
+    :: ModuleRef -> IO CString
+
+foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
+    :: ModuleRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMGetTarget" getTarget
+    :: ModuleRef -> IO CString
+
+foreign import ccall unsafe "LLVMSetTarget" setTarget
+    :: ModuleRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
+    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
+
+foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
+    :: (Ptr ModuleFlagEntry) -> IO ()
+
+foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
+    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
+
+foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
+    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
+    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
+    :: ModuleRef -> CString -> CSize -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
+    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
+
+foreign import ccall unsafe "LLVMDumpModule" dumpModule
+    :: ModuleRef -> IO ()
+
+foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
+    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
+    :: ModuleRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
+    :: ModuleRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
+    :: ModuleRef -> CString -> CSize -> IO ()
+
+foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
+    :: ModuleRef -> CString -> CSize -> IO ()
+
+foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
+    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
+    :: ModuleRef -> IO ContextRef
+
+foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
+    :: ModuleRef -> CString -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
+    :: ModuleRef -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
+    :: ModuleRef -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
+    :: NamedMDNodeRef -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
+    :: NamedMDNodeRef -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
+    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
+    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
+
+foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
+    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
+    :: ModuleRef -> CString -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
+    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
+
+foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
+    :: ModuleRef -> CString -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
+    :: ValueRef -> (Ptr CUInt) -> IO CString
+
+foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
+    :: ValueRef -> (Ptr CUInt) -> IO CString
+
+foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMAddFunction" addFunction
+    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
+    :: ModuleRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
+    :: ModuleRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
+    :: TypeRef -> IO TypeKind
+
+foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
+    :: TypeRef -> IO ContextRef
+
+foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
+    :: TypeRef -> IO CString
+
+foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
+    :: ContextRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMInt1Type" int1Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMInt8Type" int8Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMInt16Type" int16Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMInt32Type" int32Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMInt64Type" int64Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMInt128Type" int128Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMIntType" intType
+    :: CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMBFloatTypeInContext" bFloatTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMHalfType" halfType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMBFloatType" bFloatType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMFloatType" floatType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMDoubleType" doubleType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMFP128Type" fP128Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMFunctionType" functionType
+    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
+
+foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetReturnType" getReturnType
+    :: TypeRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
+    :: TypeRef -> (Ptr TypeRef) -> IO ()
+
+foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
+    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
+
+foreign import ccall unsafe "LLVMStructType" structType
+    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
+
+foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
+    :: ContextRef -> CString -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetStructName" getStructName
+    :: TypeRef -> IO CString
+
+foreign import ccall unsafe "LLVMStructSetBody" structSetBody
+    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
+    :: TypeRef -> (Ptr TypeRef) -> IO ()
+
+foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
+    :: TypeRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetElementType" getElementType
+    :: TypeRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
+    :: TypeRef -> (Ptr TypeRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMArrayType" arrayType
+    :: TypeRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMArrayType2" arrayType2
+    :: TypeRef -> Word64 -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetArrayLength2" getArrayLength2
+    :: TypeRef -> IO Word64
+
+foreign import ccall unsafe "LLVMPointerType" pointerType
+    :: TypeRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMPointerTypeIsOpaque" pointerTypeIsOpaque
+    :: TypeRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMPointerTypeInContext" pointerTypeInContext
+    :: ContextRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMVectorType" vectorType
+    :: TypeRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMScalableVectorType" scalableVectorType
+    :: TypeRef -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
+    :: TypeRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMX86AMXTypeInContext" x86AMXTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
+    :: ContextRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMVoidType" voidType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMLabelType" labelType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMX86AMXType" x86AMXType
+    :: IO TypeRef
+
+foreign import ccall unsafe "LLVMTargetExtTypeInContext" targetExtTypeInContext
+    :: ContextRef -> CString -> (Ptr TypeRef) -> CUInt -> (Ptr CUInt) -> CUInt -> IO TypeRef
+
+foreign import ccall unsafe "LLVMTypeOf" typeOf
+    :: ValueRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetValueKind" getValueKind
+    :: ValueRef -> IO ValueKind
+
+foreign import ccall unsafe "LLVMGetValueName2" getValueName2
+    :: ValueRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMSetValueName2" setValueName2
+    :: ValueRef -> CString -> CSize -> IO ()
+
+foreign import ccall unsafe "LLVMDumpValue" dumpValue
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
+    :: ValueRef -> IO CString
+
+foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMIsConstant" isConstant
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsUndef" isUndef
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsPoison" isPoison
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsAValueAsMetadata" isAValueAsMetadata
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsAMDString" isAMDString
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetValueName" getValueName
+    :: ValueRef -> IO CString
+
+foreign import ccall unsafe "LLVMSetValueName" setValueName
+    :: ValueRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
+    :: ValueRef -> IO UseRef
+
+foreign import ccall unsafe "LLVMGetNextUse" getNextUse
+    :: UseRef -> IO UseRef
+
+foreign import ccall unsafe "LLVMGetUser" getUser
+    :: UseRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
+    :: UseRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetOperand" getOperand
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
+    :: ValueRef -> CUInt -> IO UseRef
+
+foreign import ccall unsafe "LLVMSetOperand" setOperand
+    :: ValueRef -> CUInt -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
+    :: ValueRef -> IO CInt
+
+foreign import ccall unsafe "LLVMConstNull" constNull
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetUndef" getUndef
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPoison" getPoison
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsNull" isNull
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstInt" constInt
+    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
+    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
+    :: TypeRef -> CString -> Word8 -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
+    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstReal" constReal
+    :: TypeRef -> CDouble -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
+    :: TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
+    :: TypeRef -> CString -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
+    :: ValueRef -> IO CULLong
+
+foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
+    :: ValueRef -> IO CLLong
+
+foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
+    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
+
+foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
+    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstString" constString
+    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsConstantString" isConstantString
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetAsString" getAsString
+    :: ValueRef -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
+    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstStruct" constStruct
+    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstArray" constArray
+    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstArray2" constArray2
+    :: TypeRef -> (Ptr ValueRef) -> Word64 -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
+    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetAggregateElement" getAggregateElement
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstVector" constVector
+    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
+    :: ValueRef -> IO Opcode
+
+foreign import ccall unsafe "LLVMAlignOf" alignOf
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSizeOf" sizeOf
+    :: TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNeg" constNeg
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNot" constNot
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstAdd" constAdd
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstSub" constSub
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstMul" constMul
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstAnd" constAnd
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstOr" constOr
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstXor" constXor
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstICmp" constICmp
+    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFCmp" constFCmp
+    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstShl" constShl
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstLShr" constLShr
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstAShr" constAShr
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstGEP2" constGEP2
+    :: TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstInBoundsGEP2" constInBoundsGEP2
+    :: TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstTrunc" constTrunc
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstSExt" constSExt
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstZExt" constZExt
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFPExt" constFPExt
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstBitCast" constBitCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstIntCast" constIntCast
+    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstFPCast" constFPCast
+    :: ValueRef -> TypeRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
+    :: ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
+    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
+    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBlockAddress" blockAddress
+    :: ValueRef -> BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
+    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
+    :: ValueRef -> IO ModuleRef
+
+foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetLinkage" getLinkage
+    :: ValueRef -> IO Linkage
+
+foreign import ccall unsafe "LLVMSetLinkage" setLinkage
+    :: ValueRef -> Linkage -> IO ()
+
+foreign import ccall unsafe "LLVMGetSection" getSection
+    :: ValueRef -> IO CString
+
+foreign import ccall unsafe "LLVMSetSection" setSection
+    :: ValueRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMGetVisibility" getVisibility
+    :: ValueRef -> IO Visibility
+
+foreign import ccall unsafe "LLVMSetVisibility" setVisibility
+    :: ValueRef -> Visibility -> IO ()
+
+foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
+    :: ValueRef -> IO DLLStorageClass
+
+foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
+    :: ValueRef -> DLLStorageClass -> IO ()
+
+foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
+    :: ValueRef -> IO UnnamedAddr
+
+foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
+    :: ValueRef -> UnnamedAddr -> IO ()
+
+foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
+    :: ValueRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetAlignment" getAlignment
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMSetAlignment" setAlignment
+    :: ValueRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
+    :: ValueRef -> CUInt -> MetadataRef -> IO ()
+
+foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
+    :: ValueRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
+    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
+
+foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
+    :: (Ptr ValueMetadataEntry) -> IO ()
+
+foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
+    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
+
+foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
+    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMAddGlobal" addGlobal
+    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
+    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
+    :: ModuleRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetInitializer" getInitializer
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetInitializer" setInitializer
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
+    :: ValueRef -> IO ThreadLocalMode
+
+foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
+    :: ValueRef -> ThreadLocalMode -> IO ()
+
+foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMAddAlias2" addAlias2
+    :: ModuleRef -> TypeRef -> CUInt -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
+    :: ModuleRef -> CString -> CSize -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMLookupIntrinsicID" lookupIntrinsicID
+    :: CString -> CSize -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
+    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
+    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
+
+foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
+    :: CUInt -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
+    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName2" intrinsicCopyOverloadedName2
+    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
+
+foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
+    :: CUInt -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
+    :: ValueRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMGetGC" getGC
+    :: ValueRef -> IO CString
+
+foreign import ccall unsafe "LLVMSetGC" setGC
+    :: ValueRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
+    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
+    :: ValueRef -> AttributeIndex -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
+    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
+    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
+    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
+    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
+    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
+    :: ValueRef -> CString -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMCountParams" countParams
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetParams" getParams
+    :: ValueRef -> (Ptr ValueRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetParam" getParam
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetParamParent" getParamParent
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastParam" getLastParam
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNextParam" getNextParam
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
+    :: ValueRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMAddGlobalIFunc" addGlobalIFunc
+    :: ModuleRef -> CString -> CSize -> TypeRef -> CUInt -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNamedGlobalIFunc" getNamedGlobalIFunc
+    :: ModuleRef -> CString -> CSize -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetFirstGlobalIFunc" getFirstGlobalIFunc
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastGlobalIFunc" getLastGlobalIFunc
+    :: ModuleRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNextGlobalIFunc" getNextGlobalIFunc
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousGlobalIFunc" getPreviousGlobalIFunc
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetGlobalIFuncResolver" getGlobalIFuncResolver
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetGlobalIFuncResolver" setGlobalIFuncResolver
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMEraseGlobalIFunc" eraseGlobalIFunc
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMRemoveGlobalIFunc" removeGlobalIFunc
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMMDStringInContext2" mDStringInContext2
+    :: ContextRef -> CString -> CSize -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMMDNodeInContext2" mDNodeInContext2
+    :: ContextRef -> (Ptr MetadataRef) -> CSize -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
+    :: ContextRef -> MetadataRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
+    :: ValueRef -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMGetMDString" getMDString
+    :: ValueRef -> (Ptr CUInt) -> IO CString
+
+foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
+    :: ValueRef -> (Ptr ValueRef) -> IO ()
+
+foreign import ccall unsafe "LLVMReplaceMDNodeOperandWith" replaceMDNodeOperandWith
+    :: ValueRef -> CUInt -> MetadataRef -> IO ()
+
+foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
+    :: ContextRef -> CString -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMMDString" mDString
+    :: CString -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
+    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMMDNode" mDNode
+    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
+    :: BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
+    :: BasicBlockRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
+    :: BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
+    :: BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
+    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
+    :: BasicBlockRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
+    :: BasicBlockRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMInsertExistingBasicBlockAfterInsertBlock" insertExistingBasicBlockAfterInsertBlock
+    :: BuilderRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMAppendExistingBasicBlock" appendExistingBasicBlock
+    :: ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
+    :: ContextRef -> CString -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
+    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
+    :: ValueRef -> CString -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
+    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
+    :: BasicBlockRef -> CString -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
+    :: BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
+    :: BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
+    :: BasicBlockRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
+    :: BasicBlockRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
+    :: BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
+    :: BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
+    :: ValueRef -> IO CInt
+
+foreign import ccall unsafe "LLVMGetMetadata" getMetadata
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetMetadata" setMetadata
+    :: ValueRef -> CUInt -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
+    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
+
+foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMDeleteInstruction" deleteInstruction
+    :: ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
+    :: ValueRef -> IO Opcode
+
+foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
+    :: ValueRef -> IO IntPredicate
+
+foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
+    :: ValueRef -> IO RealPredicate
+
+foreign import ccall unsafe "LLVMInstructionClone" instructionClone
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
+    :: ValueRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
+    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
+    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
+    :: ValueRef -> AttributeIndex -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
+    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
+    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
+    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
+
+foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
+    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
+    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
+    :: ValueRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMIsTailCall" isTailCall
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetTailCall" setTailCall
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
+    :: ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
+    :: ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
+    :: ValueRef -> CUInt -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
+    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMIsConditional" isConditional
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetCondition" getCondition
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetCondition" setCondition
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
+    :: ValueRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
+    :: ValueRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMIsInBounds" isInBounds
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetGEPSourceElementType" getGEPSourceElementType
+    :: ValueRef -> IO TypeRef
+
+foreign import ccall unsafe "LLVMAddIncoming" addIncoming
+    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMCountIncoming" countIncoming
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
+    :: ValueRef -> CUInt -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetIndices" getIndices
+    :: ValueRef -> IO (Ptr CUInt)
+
+foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
+    :: ContextRef -> IO BuilderRef
+
+foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
+    :: IO BuilderRef
+
+foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
+    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
+    :: BuilderRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
+    :: BuilderRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
+    :: BuilderRef -> IO BasicBlockRef
+
+foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
+    :: BuilderRef -> IO ()
+
+foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
+    :: BuilderRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
+    :: BuilderRef -> ValueRef -> CString -> IO ()
+
+foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
+    :: BuilderRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetCurrentDebugLocation2" getCurrentDebugLocation2
+    :: BuilderRef -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMSetCurrentDebugLocation2" setCurrentDebugLocation2
+    :: BuilderRef -> MetadataRef -> IO ()
+
+foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
+    :: BuilderRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMAddMetadataToInst" addMetadataToInst
+    :: BuilderRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMBuilderGetDefaultFPMathTag" builderGetDefaultFPMathTag
+    :: BuilderRef -> IO MetadataRef
+
+foreign import ccall unsafe "LLVMBuilderSetDefaultFPMathTag" builderSetDefaultFPMathTag
+    :: BuilderRef -> MetadataRef -> IO ()
+
+foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
+    :: BuilderRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
+    :: BuilderRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
+    :: BuilderRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildRet" buildRet
+    :: BuilderRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
+    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildBr" buildBr
+    :: BuilderRef -> BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
+    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
+    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
+    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
+    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
+    :: BuilderRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildResume" buildResume
+    :: BuilderRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
+    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
+    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
+    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
+    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
+    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
+    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMAddCase" addCase
+    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMAddDestination" addDestination
+    :: ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetClause" getClause
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMAddClause" addClause
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMIsCleanup" isCleanup
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetCleanup" setCleanup
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMAddHandler" addHandler
+    :: ValueRef -> BasicBlockRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetHandlers" getHandlers
+    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
+
+foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
+    :: ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
+    :: ValueRef -> CUInt -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
+    :: ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
+    :: ValueRef -> ValueRef -> IO ()
+
+foreign import ccall unsafe "LLVMBuildAdd" buildAdd
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSub" buildSub
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFSub" buildFSub
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildMul" buildMul
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFMul" buildFMul
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildURem" buildURem
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSRem" buildSRem
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFRem" buildFRem
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildShl" buildShl
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildLShr" buildLShr
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAShr" buildAShr
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAnd" buildAnd
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildOr" buildOr
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildXor" buildXor
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
+    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNeg" buildNeg
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildNot" buildNot
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNUW" getNUW
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetNUW" setNUW
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetNSW" getNSW
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetNSW" setNSW
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetExact" getExact
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetExact" setExact
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
+    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
+    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
+    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
+    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
+    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
+    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
+    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFree" buildFree
+    :: BuilderRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
+    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildStore" buildStore
+    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
+    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
+    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
+    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
+    :: BuilderRef -> CString -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
+    :: BuilderRef -> CString -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetVolatile" getVolatile
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetVolatile" setVolatile
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetWeak" getWeak
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetWeak" setWeak
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetOrdering" getOrdering
+    :: ValueRef -> IO AtomicOrdering
+
+foreign import ccall unsafe "LLVMSetOrdering" setOrdering
+    :: ValueRef -> AtomicOrdering -> IO ()
+
+foreign import ccall unsafe "LLVMGetAtomicRMWBinOp" getAtomicRMWBinOp
+    :: ValueRef -> IO AtomicRMWBinOp
+
+foreign import ccall unsafe "LLVMSetAtomicRMWBinOp" setAtomicRMWBinOp
+    :: ValueRef -> AtomicRMWBinOp -> IO ()
+
+foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildZExt" buildZExt
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSExt" buildSExt
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCast" buildCast
+    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
+    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetCastOpcode" getCastOpcode
+    :: ValueRef -> LLVM.Bool -> TypeRef -> LLVM.Bool -> IO Opcode
+
+foreign import ccall unsafe "LLVMBuildICmp" buildICmp
+    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
+    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildPhi" buildPhi
+    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildCall2" buildCall2
+    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildSelect" buildSelect
+    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
+    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
+    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
+    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
+    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
+    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
+    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFreeze" buildFreeze
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
+    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildPtrDiff2" buildPtrDiff2
+    :: BuilderRef -> TypeRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildFence" buildFence
+    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
+    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
+    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
+
+foreign import ccall unsafe "LLVMGetNumMaskElements" getNumMaskElements
+    :: ValueRef -> IO CUInt
+
+foreign import ccall unsafe "LLVMGetUndefMaskElem" getUndefMaskElem
+    :: IO CInt
+
+foreign import ccall unsafe "LLVMGetMaskValue" getMaskValue
+    :: ValueRef -> CUInt -> IO CInt
+
+foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
+    :: ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
+    :: ValueRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
+    :: ValueRef -> IO AtomicOrdering
+
+foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
+    :: ValueRef -> AtomicOrdering -> IO ()
+
+foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
+    :: ValueRef -> IO AtomicOrdering
+
+foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
+    :: ValueRef -> AtomicOrdering -> IO ()
+
+foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
+    :: ModuleRef -> IO ModuleProviderRef
+
+foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
+    :: ModuleProviderRef -> IO ()
+
+foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
+    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
+    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
+    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
+
+foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
+    :: CString -> CSize -> CString -> IO MemoryBufferRef
+
+foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
+    :: MemoryBufferRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
+    :: MemoryBufferRef -> IO CSize
+
+foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
+    :: MemoryBufferRef -> IO ()
+
+foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
+    :: IO PassManagerRef
+
+foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
+    :: ModuleRef -> IO PassManagerRef
+
+foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
+    :: ModuleProviderRef -> IO PassManagerRef
+
+foreign import ccall unsafe "LLVMRunPassManager" runPassManager
+    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
+    :: PassManagerRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
+    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
+    :: PassManagerRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
+    :: PassManagerRef -> IO ()
+
+foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
+    :: IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
+    :: IO ()
+
+foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
+    :: IO LLVM.Bool
diff --git a/src/3.9/LLVM/Raw/Core.hsc b/src/3.9/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/3.9/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1636 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunctionAttr" addFunctionAttr
-    :: ValueRef -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFunctionAttr" getFunctionAttr
-    :: ValueRef -> IO Attribute
-
-foreign import ccall unsafe "LLVMRemoveFunctionAttr" removeFunctionAttr
-    :: ValueRef -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddAttribute" addAttribute
-    :: ValueRef -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveAttribute" removeAttribute
-    :: ValueRef -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttribute" getAttribute
-    :: ValueRef -> IO Attribute
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddInstrAttribute" addInstrAttribute
-    :: ValueRef -> CUInt -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveInstrAttribute" removeInstrAttribute
-    :: ValueRef -> CUInt -> Attribute -> IO ()
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/4.0/LLVM/Raw/Core.hsc b/src/4.0/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/4.0/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1618 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/5.0/LLVM/Raw/Core.hsc b/src/5.0/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/5.0/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1630 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/6.0/LLVM/Raw/Core.hsc b/src/6.0/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/6.0/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1636 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/7/LLVM/Raw/Core.hsc b/src/7/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/7/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1744 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/8/LLVM/Raw/Core.hsc b/src/8/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/8/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1867 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
-    :: ContextRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
-    :: ContextRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
-    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
-    :: ValueRef -> CUInt -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
-    :: (Ptr ValueMetadataEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
-    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
-    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
-    :: CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
-    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
-    :: CUInt -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
-    :: ContextRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
-    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall2" buildCall2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/9/LLVM/Raw/Core.hsc b/src/9/LLVM/Raw/Core.hsc
deleted file mode 100644
--- a/src/9/LLVM/Raw/Core.hsc
+++ /dev/null
@@ -1,1924 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-module LLVM.Raw.Core where
-
-import qualified LLVM.FFI.Base as LLVM
-
-import qualified Foreign.C.Types as C
-import Foreign.C.String (CString)
-import Foreign.Ptr (Ptr, FunPtr)
-
-import Data.Typeable (Typeable)
-
-import Data.Word (Word8, Word32, Word64)
-
-
-type CDouble  = C.CDouble
-type CInt     = C.CInt
-type CUInt    = C.CUInt
-type CLLong   = C.CLLong
-type CULLong  = C.CULLong
-type CSize    = C.CSize
-
-
-#include <llvm/Config/llvm-config.h>
-#include <llvm-c/Core.h>
-
-
-data Module
-    deriving (Typeable)
-type ModuleRef = Ptr Module
-
-data ModuleProvider
-    deriving (Typeable)
-type ModuleProviderRef = Ptr ModuleProvider
-
-data Type
-    deriving (Typeable)
-type TypeRef = Ptr Type
-
-data BasicBlock
-    deriving (Typeable)
-type BasicBlockRef = Ptr BasicBlock
-
-data Value
-    deriving (Typeable)
-type ValueRef = Ptr Value
-
-data OpaqueUse
-    deriving (Typeable)
-type UseRef = Ptr OpaqueUse
-
-data Builder
-    deriving (Typeable)
-type BuilderRef = Ptr Builder
-
-data MemoryBuffer
-    deriving (Typeable)
-type MemoryBufferRef = Ptr MemoryBuffer
-
-data PassManager
-    deriving (Typeable)
-type PassManagerRef = Ptr PassManager
-
-data PassRegistry
-    deriving (Typeable)
-type PassRegistryRef = Ptr PassRegistry
-
-data Context
-    deriving (Typeable)
-type ContextRef = Ptr Context
-
-{-
-data Attribute
-    deriving (Typeable)
--}
--- until 3.9
-newtype Attribute = Attribute Word32
-type AttributeRef = Ptr Attribute
-
-newtype AttributeIndex = AttributeIndex #{type LLVMAttributeIndex}
-
-attributeReturnIndex, attributeFunctionIndex :: AttributeIndex
-attributeReturnIndex   = AttributeIndex (#const LLVMAttributeReturnIndex)
-attributeFunctionIndex = AttributeIndex (#const LLVMAttributeFunctionIndex)
-
-
-data Metadata
-    deriving (Typeable)
-type MetadataRef = Ptr Metadata
-
-data DiagnosticInfo
-    deriving (Typeable)
-type DiagnosticInfoRef = Ptr DiagnosticInfo
-
-data NamedMDNode
-    deriving (Typeable)
-type NamedMDNodeRef = Ptr NamedMDNode
-
-
-data ModuleFlagEntry
-    deriving (Typeable)
-data ValueMetadataEntry
-    deriving (Typeable)
-
-type DiagnosticHandler = FunPtr (DiagnosticInfoRef -> Ptr () -> IO ())
-type YieldCallback = FunPtr (ContextRef -> Ptr () -> IO ())
-
-newtype CallingConvention = CallingConvention {unCallingConvention :: CUInt}
-
-newtype AtomicOrdering = AtomicOrdering #{type LLVMAtomicOrdering}
-newtype AtomicRMWBinOp = AtomicRMWBinOp #{type LLVMAtomicRMWBinOp}
-newtype DiagnosticSeverity = DiagnosticSeverity #{type LLVMDiagnosticSeverity}
-newtype DLLStorageClass = DLLStorageClass #{type LLVMDLLStorageClass}
--- newtype InlineAsmDialect = InlineAsmDialect #{type LLVMInlineAsmDialect}
-newtype InlineAsmDialect = InlineAsmDialect Word32
-newtype IntPredicate = IntPredicate #{type LLVMIntPredicate}
-newtype Linkage = Linkage #{type LLVMLinkage}
--- newtype ModuleFlagBehavior = ModuleFlagBehavior #{type LLVMModuleFlagBehavior}
-newtype ModuleFlagBehavior = ModuleFlagBehavior Word32
-newtype Opcode = Opcode #{type LLVMOpcode}
-newtype RealPredicate = RealPredicate #{type LLVMRealPredicate}
-newtype ThreadLocalMode = ThreadLocalMode #{type LLVMThreadLocalMode}
-newtype TypeKind = TypeKind {unTypeKind :: #{type LLVMTypeKind}}
--- newtype UnnamedAddr = UnnamedAddr #{type LLVMUnnamedAddr}
-newtype UnnamedAddr = UnnamedAddr Word32
-newtype ValueKind = ValueKind #{type LLVMValueKind}
-newtype Visibility = Visibility #{type LLVMVisibility}
-
-
-foreign import ccall unsafe "LLVMInitializeCore" initializeCore
-    :: PassRegistryRef -> IO ()
-
-foreign import ccall unsafe "LLVMShutdown" shutdown
-    :: IO ()
-
-foreign import ccall unsafe "LLVMCreateMessage" createMessage
-    :: CString -> IO CString
-
-foreign import ccall unsafe "LLVMDisposeMessage" disposeMessage
-    :: CString -> IO ()
-
-foreign import ccall unsafe "LLVMContextCreate" contextCreate
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext
-    :: IO ContextRef
-
-foreign import ccall unsafe "LLVMContextSetDiagnosticHandler" contextSetDiagnosticHandler
-    :: ContextRef -> DiagnosticHandler -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticHandler" contextGetDiagnosticHandler
-    :: ContextRef -> IO DiagnosticHandler
-
-foreign import ccall unsafe "LLVMContextGetDiagnosticContext" contextGetDiagnosticContext
-    :: ContextRef -> IO (Ptr ())
-
-foreign import ccall unsafe "LLVMContextSetYieldCallback" contextSetYieldCallback
-    :: ContextRef -> YieldCallback -> (Ptr ()) -> IO ()
-
-foreign import ccall unsafe "LLVMContextShouldDiscardValueNames" contextShouldDiscardValueNames
-    :: ContextRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMContextSetDiscardValueNames" contextSetDiscardValueNames
-    :: ContextRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMContextDispose" contextDispose
-    :: ContextRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDiagInfoDescription" getDiagInfoDescription
-    :: DiagnosticInfoRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDiagInfoSeverity" getDiagInfoSeverity
-    :: DiagnosticInfoRef -> IO DiagnosticSeverity
-
-foreign import ccall unsafe "LLVMGetMDKindIDInContext" getMDKindIDInContext
-    :: ContextRef -> CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDKindID" getMDKindID
-    :: CString -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKindForName" getEnumAttributeKindForName
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetLastEnumAttributeKind" getLastEnumAttributeKind
-    :: IO CUInt
-
-foreign import ccall unsafe "LLVMCreateEnumAttribute" createEnumAttribute
-    :: ContextRef -> CUInt -> Word64 -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetEnumAttributeKind" getEnumAttributeKind
-    :: AttributeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetEnumAttributeValue" getEnumAttributeValue
-    :: AttributeRef -> IO Word64
-
-foreign import ccall unsafe "LLVMCreateStringAttribute" createStringAttribute
-    :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeKind" getStringAttributeKind
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetStringAttributeValue" getStringAttributeValue
-    :: AttributeRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMIsEnumAttribute" isEnumAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsStringAttribute" isStringAttribute
-    :: AttributeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMModuleCreateWithName" moduleCreateWithName
-    :: CString -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMModuleCreateWithNameInContext" moduleCreateWithNameInContext
-    :: CString -> ContextRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMCloneModule" cloneModule
-    :: ModuleRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMDisposeModule" disposeModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetModuleIdentifier" getModuleIdentifier
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleIdentifier" setModuleIdentifier
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetSourceFileName" getSourceFileName
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetSourceFileName" setSourceFileName
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetDataLayoutStr" getDataLayoutStr
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetDataLayout" getDataLayout
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetDataLayout" setDataLayout
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTarget" getTarget
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetTarget" setTarget
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCopyModuleFlagsMetadata" copyModuleFlagsMetadata
-    :: ModuleRef -> (Ptr CSize) -> IO (Ptr ModuleFlagEntry)
-
-foreign import ccall unsafe "LLVMDisposeModuleFlagsMetadata" disposeModuleFlagsMetadata
-    :: (Ptr ModuleFlagEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetFlagBehavior" moduleFlagEntriesGetFlagBehavior
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO ModuleFlagBehavior
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetKey" moduleFlagEntriesGetKey
-    :: (Ptr ModuleFlagEntry) -> CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMModuleFlagEntriesGetMetadata" moduleFlagEntriesGetMetadata
-    :: (Ptr ModuleFlagEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetModuleFlag" getModuleFlag
-    :: ModuleRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddModuleFlag" addModuleFlag
-    :: ModuleRef -> ModuleFlagBehavior -> CString -> CSize -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMDumpModule" dumpModule
-    :: ModuleRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintModuleToFile" printModuleToFile
-    :: ModuleRef -> CString -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMPrintModuleToString" printModuleToString
-    :: ModuleRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetModuleInlineAsm" getModuleInlineAsm
-    :: ModuleRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm2" setModuleInlineAsm2
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMAppendModuleInlineAsm" appendModuleInlineAsm
-    :: ModuleRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMGetInlineAsm" getInlineAsm
-    :: TypeRef -> CString -> CSize -> CString -> CSize -> LLVM.Bool -> LLVM.Bool -> InlineAsmDialect -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetModuleContext" getModuleContext
-    :: ModuleRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMGetTypeByName" getTypeByName
-    :: ModuleRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetFirstNamedMetadata" getFirstNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetLastNamedMetadata" getLastNamedMetadata
-    :: ModuleRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNextNamedMetadata" getNextNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetPreviousNamedMetadata" getPreviousNamedMetadata
-    :: NamedMDNodeRef -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadata" getNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetOrInsertNamedMetadata" getOrInsertNamedMetadata
-    :: ModuleRef -> CString -> CSize -> IO NamedMDNodeRef
-
-foreign import ccall unsafe "LLVMGetNamedMetadataName" getNamedMetadataName
-    :: NamedMDNodeRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMGetNamedMetadataNumOperands" getNamedMetadataNumOperands
-    :: ModuleRef -> CString -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetNamedMetadataOperands" getNamedMetadataOperands
-    :: ModuleRef -> CString -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMAddNamedMetadataOperand" addNamedMetadataOperand
-    :: ModuleRef -> CString -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetDebugLocDirectory" getDebugLocDirectory
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocFilename" getDebugLocFilename
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetDebugLocLine" getDebugLocLine
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetDebugLocColumn" getDebugLocColumn
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMAddFunction" addFunction
-    :: ModuleRef -> CString -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedFunction" getNamedFunction
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstFunction" getFirstFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastFunction" getLastFunction
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextFunction" getNextFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousFunction" getPreviousFunction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetModuleInlineAsm" setModuleInlineAsm
-    :: ModuleRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetTypeKind" getTypeKind
-    :: TypeRef -> IO TypeKind
-
-foreign import ccall unsafe "LLVMTypeIsSized" typeIsSized
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetTypeContext" getTypeContext
-    :: TypeRef -> IO ContextRef
-
-foreign import ccall unsafe "LLVMPrintTypeToString" printTypeToString
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMInt1TypeInContext" int1TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8TypeInContext" int8TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16TypeInContext" int16TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32TypeInContext" int32TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64TypeInContext" int64TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128TypeInContext" int128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntTypeInContext" intTypeInContext
-    :: ContextRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMInt1Type" int1Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt8Type" int8Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt16Type" int16Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt32Type" int32Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt64Type" int64Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMInt128Type" int128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMIntType" intType
-    :: CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetIntTypeWidth" getIntTypeWidth
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMHalfTypeInContext" halfTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatTypeInContext" floatTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleTypeInContext" doubleTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80TypeInContext" x86FP80TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128TypeInContext" fP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128TypeInContext" pPCFP128TypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHalfType" halfType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFloatType" floatType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMDoubleType" doubleType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86FP80Type" x86FP80Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFP128Type" fP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMPPCFP128Type" pPCFP128Type
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMFunctionType" functionType
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsFunctionVarArg" isFunctionVarArg
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetReturnType" getReturnType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMCountParamTypes" countParamTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParamTypes" getParamTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructTypeInContext" structTypeInContext
-    :: ContextRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructType" structType
-    :: (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO TypeRef
-
-foreign import ccall unsafe "LLVMStructCreateNamed" structCreateNamed
-    :: ContextRef -> CString -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetStructName" getStructName
-    :: TypeRef -> IO CString
-
-foreign import ccall unsafe "LLVMStructSetBody" structSetBody
-    :: TypeRef -> (Ptr TypeRef) -> CUInt -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMCountStructElementTypes" countStructElementTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetStructElementTypes" getStructElementTypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMStructGetTypeAtIndex" structGetTypeAtIndex
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsPackedStruct" isPackedStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsOpaqueStruct" isOpaqueStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsLiteralStruct" isLiteralStruct
-    :: TypeRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetElementType" getElementType
-    :: TypeRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetSubtypes" getSubtypes
-    :: TypeRef -> (Ptr TypeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumContainedTypes" getNumContainedTypes
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMArrayType" arrayType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetArrayLength" getArrayLength
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMPointerType" pointerType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetPointerAddressSpace" getPointerAddressSpace
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVectorType" vectorType
-    :: TypeRef -> CUInt -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetVectorSize" getVectorSize
-    :: TypeRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMVoidTypeInContext" voidTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelTypeInContext" labelTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXTypeInContext" x86MMXTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMTokenTypeInContext" tokenTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMMetadataTypeInContext" metadataTypeInContext
-    :: ContextRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMVoidType" voidType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMLabelType" labelType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMX86MMXType" x86MMXType
-    :: IO TypeRef
-
-foreign import ccall unsafe "LLVMTypeOf" typeOf
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetValueKind" getValueKind
-    :: ValueRef -> IO ValueKind
-
-foreign import ccall unsafe "LLVMGetValueName2" getValueName2
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName2" setValueName2
-    :: ValueRef -> CString -> CSize -> IO ()
-
-foreign import ccall unsafe "LLVMDumpValue" dumpValue
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPrintValueToString" printValueToString
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMReplaceAllUsesWith" replaceAllUsesWith
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConstant" isConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsUndef" isUndef
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMIsAMDNode" isAMDNode
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAMDString" isAMDString
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetValueName" getValueName
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetValueName" setValueName
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstUse" getFirstUse
-    :: ValueRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetNextUse" getNextUse
-    :: UseRef -> IO UseRef
-
-foreign import ccall unsafe "LLVMGetUser" getUser
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUsedValue" getUsedValue
-    :: UseRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperand" getOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetOperandUse" getOperandUse
-    :: ValueRef -> CUInt -> IO UseRef
-
-foreign import ccall unsafe "LLVMSetOperand" setOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumOperands" getNumOperands
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMConstNull" constNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAllOnes" constAllOnes
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetUndef" getUndef
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsNull" isNull
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMConstPointerNull" constPointerNull
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInt" constInt
-    :: TypeRef -> CULLong -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfArbitraryPrecision" constIntOfArbitraryPrecision
-    :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfString" constIntOfString
-    :: TypeRef -> CString -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntOfStringAndSize" constIntOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstReal" constReal
-    :: TypeRef -> CDouble -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfString" constRealOfString
-    :: TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstRealOfStringAndSize" constRealOfStringAndSize
-    :: TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntGetZExtValue" constIntGetZExtValue
-    :: ValueRef -> IO CULLong
-
-foreign import ccall unsafe "LLVMConstIntGetSExtValue" constIntGetSExtValue
-    :: ValueRef -> IO CLLong
-
-foreign import ccall unsafe "LLVMConstRealGetDouble" constRealGetDouble
-    :: ValueRef -> (Ptr LLVM.Bool) -> IO CDouble
-
-foreign import ccall unsafe "LLVMConstStringInContext" constStringInContext
-    :: ContextRef -> CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstString" constString
-    :: CString -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsConstantString" isConstantString
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetAsString" getAsString
-    :: ValueRef -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMConstStructInContext" constStructInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstStruct" constStruct
-    :: (Ptr ValueRef) -> CUInt -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstArray" constArray
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNamedStruct" constNamedStruct
-    :: TypeRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetElementAsConstant" getElementAsConstant
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstVector" constVector
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetConstOpcode" getConstOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMAlignOf" alignOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSizeOf" sizeOf
-    :: TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNeg" constNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWNeg" constNSWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWNeg" constNUWNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFNeg" constFNeg
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNot" constNot
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAdd" constAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWAdd" constNSWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWAdd" constNUWAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFAdd" constFAdd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSub" constSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWSub" constNSWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWSub" constNUWSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFSub" constFSub
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstMul" constMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNSWMul" constNSWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstNUWMul" constNUWMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFMul" constFMul
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUDiv" constUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactUDiv" constExactUDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSDiv" constSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExactSDiv" constExactSDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFDiv" constFDiv
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstURem" constURem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSRem" constSRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFRem" constFRem
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAnd" constAnd
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstOr" constOr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstXor" constXor
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstICmp" constICmp
-    :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFCmp" constFCmp
-    :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShl" constShl
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstLShr" constLShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAShr" constAShr
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstGEP" constGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInBoundsGEP" constInBoundsGEP
-    :: ValueRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTrunc" constTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExt" constSExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExt" constZExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPTrunc" constFPTrunc
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPExt" constFPExt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstUIToFP" constUIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSIToFP" constSIToFP
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToUI" constFPToUI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPToSI" constFPToSI
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPtrToInt" constPtrToInt
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntToPtr" constIntToPtr
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstBitCast" constBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstAddrSpaceCast" constAddrSpaceCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstZExtOrBitCast" constZExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSExtOrBitCast" constSExtOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstTruncOrBitCast" constTruncOrBitCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstPointerCast" constPointerCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstIntCast" constIntCast
-    :: ValueRef -> TypeRef -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstFPCast" constFPCast
-    :: ValueRef -> TypeRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstSelect" constSelect
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractElement" constExtractElement
-    :: ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertElement" constInsertElement
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstShuffleVector" constShuffleVector
-    :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstExtractValue" constExtractValue
-    :: ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInsertValue" constInsertValue
-    :: ValueRef -> ValueRef -> (Ptr CUInt) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBlockAddress" blockAddress
-    :: ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMConstInlineAsm" constInlineAsm
-    :: TypeRef -> CString -> CString -> LLVM.Bool -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalParent" getGlobalParent
-    :: ValueRef -> IO ModuleRef
-
-foreign import ccall unsafe "LLVMIsDeclaration" isDeclaration
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetLinkage" getLinkage
-    :: ValueRef -> IO Linkage
-
-foreign import ccall unsafe "LLVMSetLinkage" setLinkage
-    :: ValueRef -> Linkage -> IO ()
-
-foreign import ccall unsafe "LLVMGetSection" getSection
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetSection" setSection
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMGetVisibility" getVisibility
-    :: ValueRef -> IO Visibility
-
-foreign import ccall unsafe "LLVMSetVisibility" setVisibility
-    :: ValueRef -> Visibility -> IO ()
-
-foreign import ccall unsafe "LLVMGetDLLStorageClass" getDLLStorageClass
-    :: ValueRef -> IO DLLStorageClass
-
-foreign import ccall unsafe "LLVMSetDLLStorageClass" setDLLStorageClass
-    :: ValueRef -> DLLStorageClass -> IO ()
-
-foreign import ccall unsafe "LLVMGetUnnamedAddress" getUnnamedAddress
-    :: ValueRef -> IO UnnamedAddr
-
-foreign import ccall unsafe "LLVMSetUnnamedAddress" setUnnamedAddress
-    :: ValueRef -> UnnamedAddr -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalGetValueType" globalGetValueType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMHasUnnamedAddr" hasUnnamedAddr
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetUnnamedAddr" setUnnamedAddr
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetAlignment" getAlignment
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetAlignment" setAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalSetMetadata" globalSetMetadata
-    :: ValueRef -> CUInt -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalEraseMetadata" globalEraseMetadata
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalClearMetadata" globalClearMetadata
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGlobalCopyAllMetadata" globalCopyAllMetadata
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMDisposeValueMetadataEntries" disposeValueMetadataEntries
-    :: (Ptr ValueMetadataEntry) -> IO ()
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetKind" valueMetadataEntriesGetKind
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO CUInt
-
-foreign import ccall unsafe "LLVMValueMetadataEntriesGetMetadata" valueMetadataEntriesGetMetadata
-    :: (Ptr ValueMetadataEntry) -> CUInt -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMAddGlobal" addGlobal
-    :: ModuleRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddGlobalInAddressSpace" addGlobalInAddressSpace
-    :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobal" getNamedGlobal
-    :: ModuleRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobal" getFirstGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobal" getLastGlobal
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobal" getNextGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobal" getPreviousGlobal
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMDeleteGlobal" deleteGlobal
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInitializer" getInitializer
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetInitializer" setInitializer
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsThreadLocal" isThreadLocal
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetThreadLocal" setThreadLocal
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMIsGlobalConstant" isGlobalConstant
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetGlobalConstant" setGlobalConstant
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetThreadLocalMode" getThreadLocalMode
-    :: ValueRef -> IO ThreadLocalMode
-
-foreign import ccall unsafe "LLVMSetThreadLocalMode" setThreadLocalMode
-    :: ValueRef -> ThreadLocalMode -> IO ()
-
-foreign import ccall unsafe "LLVMIsExternallyInitialized" isExternallyInitialized
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetExternallyInitialized" setExternallyInitialized
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddAlias" addAlias
-    :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalAlias" getNamedGlobalAlias
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalAlias" getFirstGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalAlias" getLastGlobalAlias
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalAlias" getNextGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalAlias" getPreviousGlobalAlias
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasGetAliasee" aliasGetAliasee
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAliasSetAliasee" aliasSetAliasee
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMDeleteFunction" deleteFunction
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMHasPersonalityFn" hasPersonalityFn
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetPersonalityFn" getPersonalityFn
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetPersonalityFn" setPersonalityFn
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMLookupIntrinsicID" lookupIntrinsicID
-    :: CString -> CSize -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicID" getIntrinsicID
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIntrinsicDeclaration" getIntrinsicDeclaration
-    :: ModuleRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetType" intrinsicGetType
-    :: ContextRef -> CUInt -> (Ptr TypeRef) -> CSize -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIntrinsicGetName" intrinsicGetName
-    :: CUInt -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicCopyOverloadedName" intrinsicCopyOverloadedName
-    :: CUInt -> (Ptr TypeRef) -> CSize -> (Ptr CSize) -> IO CString
-
-foreign import ccall unsafe "LLVMIntrinsicIsOverloaded" intrinsicIsOverloaded
-    :: CUInt -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetFunctionCallConv" getFunctionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetFunctionCallConv" setFunctionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetGC" getGC
-    :: ValueRef -> IO CString
-
-foreign import ccall unsafe "LLVMSetGC" setGC
-    :: ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMAddAttributeAtIndex" addAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetAttributeCountAtIndex" getAttributeCountAtIndex
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetAttributesAtIndex" getAttributesAtIndex
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetEnumAttributeAtIndex" getEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetStringAttributeAtIndex" getStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveEnumAttributeAtIndex" removeEnumAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveStringAttributeAtIndex" removeStringAttributeAtIndex
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddTargetDependentFunctionAttr" addTargetDependentFunctionAttr
-    :: ValueRef -> CString -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMCountParams" countParams
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetParams" getParams
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetParam" getParam
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetParamParent" getParamParent
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstParam" getFirstParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastParam" getLastParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextParam" getNextParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousParam" getPreviousParam
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParamAlignment" setParamAlignment
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddGlobalIFunc" addGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> TypeRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNamedGlobalIFunc" getNamedGlobalIFunc
-    :: ModuleRef -> CString -> CSize -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetFirstGlobalIFunc" getFirstGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastGlobalIFunc" getLastGlobalIFunc
-    :: ModuleRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNextGlobalIFunc" getNextGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousGlobalIFunc" getPreviousGlobalIFunc
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetGlobalIFuncResolver" getGlobalIFuncResolver
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetGlobalIFuncResolver" setGlobalIFuncResolver
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMEraseGlobalIFunc" eraseGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveGlobalIFunc" removeGlobalIFunc
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext2" mDStringInContext2
-    :: ContextRef -> CString -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext2" mDNodeInContext2
-    :: ContextRef -> (Ptr MetadataRef) -> CSize -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMMetadataAsValue" metadataAsValue
-    :: ContextRef -> MetadataRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueAsMetadata" valueAsMetadata
-    :: ValueRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMGetMDString" getMDString
-    :: ValueRef -> (Ptr CUInt) -> IO CString
-
-foreign import ccall unsafe "LLVMGetMDNodeNumOperands" getMDNodeNumOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetMDNodeOperands" getMDNodeOperands
-    :: ValueRef -> (Ptr ValueRef) -> IO ()
-
-foreign import ccall unsafe "LLVMMDStringInContext" mDStringInContext
-    :: ContextRef -> CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDString" mDString
-    :: CString -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNodeInContext" mDNodeInContext
-    :: ContextRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMMDNode" mDNode
-    :: (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBasicBlockAsValue" basicBlockAsValue
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMValueIsBasicBlock" valueIsBasicBlock
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMValueAsBasicBlock" valueAsBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockName" getBasicBlockName
-    :: BasicBlockRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBasicBlockParent" getBasicBlockParent
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetBasicBlockTerminator" getBasicBlockTerminator
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMCountBasicBlocks" countBasicBlocks
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetBasicBlocks" getBasicBlocks
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstBasicBlock" getFirstBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetLastBasicBlock" getLastBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextBasicBlock" getNextBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetPreviousBasicBlock" getPreviousBasicBlock
-    :: BasicBlockRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetEntryBasicBlock" getEntryBasicBlock
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertExistingBasicBlockAfterInsertBlock" insertExistingBasicBlockAfterInsertBlock
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAppendExistingBasicBlock" appendExistingBasicBlock
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateBasicBlockInContext" createBasicBlockInContext
-    :: ContextRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlockInContext" appendBasicBlockInContext
-    :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMAppendBasicBlock" appendBasicBlock
-    :: ValueRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlockInContext" insertBasicBlockInContext
-    :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMInsertBasicBlock" insertBasicBlock
-    :: BasicBlockRef -> CString -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMDeleteBasicBlock" deleteBasicBlock
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveBasicBlockFromParent" removeBasicBlockFromParent
-    :: BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockBefore" moveBasicBlockBefore
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMMoveBasicBlockAfter" moveBasicBlockAfter
-    :: BasicBlockRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetFirstInstruction" getFirstInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetLastInstruction" getLastInstruction
-    :: BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMHasMetadata" hasMetadata
-    :: ValueRef -> IO CInt
-
-foreign import ccall unsafe "LLVMGetMetadata" getMetadata
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetMetadata" setMetadata
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionGetAllMetadataOtherThanDebugLoc" instructionGetAllMetadataOtherThanDebugLoc
-    :: ValueRef -> (Ptr CSize) -> IO (Ptr ValueMetadataEntry)
-
-foreign import ccall unsafe "LLVMGetInstructionParent" getInstructionParent
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNextInstruction" getNextInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetPreviousInstruction" getPreviousInstruction
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMInstructionRemoveFromParent" instructionRemoveFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInstructionEraseFromParent" instructionEraseFromParent
-    :: ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionOpcode" getInstructionOpcode
-    :: ValueRef -> IO Opcode
-
-foreign import ccall unsafe "LLVMGetICmpPredicate" getICmpPredicate
-    :: ValueRef -> IO IntPredicate
-
-foreign import ccall unsafe "LLVMGetFCmpPredicate" getFCmpPredicate
-    :: ValueRef -> IO RealPredicate
-
-foreign import ccall unsafe "LLVMInstructionClone" instructionClone
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsATerminatorInst" isATerminatorInst
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetNumArgOperands" getNumArgOperands
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstructionCallConv" setInstructionCallConv
-    :: ValueRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetInstructionCallConv" getInstructionCallConv
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMSetInstrParamAlignment" setInstrParamAlignment
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMAddCallSiteAttribute" addCallSiteAttribute
-    :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributeCount" getCallSiteAttributeCount
-    :: ValueRef -> AttributeIndex -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetCallSiteAttributes" getCallSiteAttributes
-    :: ValueRef -> AttributeIndex -> (Ptr AttributeRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetCallSiteEnumAttribute" getCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMGetCallSiteStringAttribute" getCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
-
-foreign import ccall unsafe "LLVMRemoveCallSiteEnumAttribute" removeCallSiteEnumAttribute
-    :: ValueRef -> AttributeIndex -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMRemoveCallSiteStringAttribute" removeCallSiteStringAttribute
-    :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMGetCalledFunctionType" getCalledFunctionType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMGetCalledValue" getCalledValue
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsTailCall" isTailCall
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetTailCall" setTailCall
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetNormalDest" getNormalDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetUnwindDest" getUnwindDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetNormalDest" setNormalDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetUnwindDest" setUnwindDest
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumSuccessors" getNumSuccessors
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetSuccessor" getSuccessor
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMSetSuccessor" setSuccessor
-    :: ValueRef -> CUInt -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsConditional" isConditional
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMGetCondition" getCondition
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetCondition" setCondition
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetSwitchDefaultDest" getSwitchDefaultDest
-    :: ValueRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetAllocatedType" getAllocatedType
-    :: ValueRef -> IO TypeRef
-
-foreign import ccall unsafe "LLVMIsInBounds" isInBounds
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetIsInBounds" setIsInBounds
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddIncoming" addIncoming
-    :: ValueRef -> (Ptr ValueRef) -> (Ptr BasicBlockRef) -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMCountIncoming" countIncoming
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIncomingValue" getIncomingValue
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetIncomingBlock" getIncomingBlock
-    :: ValueRef -> CUInt -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMGetNumIndices" getNumIndices
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetIndices" getIndices
-    :: ValueRef -> IO (Ptr CUInt)
-
-foreign import ccall unsafe "LLVMCreateBuilderInContext" createBuilderInContext
-    :: ContextRef -> IO BuilderRef
-
-foreign import ccall unsafe "LLVMCreateBuilder" createBuilder
-    :: IO BuilderRef
-
-foreign import ccall unsafe "LLVMPositionBuilder" positionBuilder
-    :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderBefore" positionBuilderBefore
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMPositionBuilderAtEnd" positionBuilderAtEnd
-    :: BuilderRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetInsertBlock" getInsertBlock
-    :: BuilderRef -> IO BasicBlockRef
-
-foreign import ccall unsafe "LLVMClearInsertionPosition" clearInsertionPosition
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilder" insertIntoBuilder
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMInsertIntoBuilderWithName" insertIntoBuilderWithName
-    :: BuilderRef -> ValueRef -> CString -> IO ()
-
-foreign import ccall unsafe "LLVMDisposeBuilder" disposeBuilder
-    :: BuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation2" getCurrentDebugLocation2
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation2" setCurrentDebugLocation2
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetInstDebugLocation" setInstDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuilderGetDefaultFPMathTag" builderGetDefaultFPMathTag
-    :: BuilderRef -> IO MetadataRef
-
-foreign import ccall unsafe "LLVMBuilderSetDefaultFPMathTag" builderSetDefaultFPMathTag
-    :: BuilderRef -> MetadataRef -> IO ()
-
-foreign import ccall unsafe "LLVMSetCurrentDebugLocation" setCurrentDebugLocation
-    :: BuilderRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetCurrentDebugLocation" getCurrentDebugLocation
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRetVoid" buildRetVoid
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildRet" buildRet
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAggregateRet" buildAggregateRet
-    :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBr" buildBr
-    :: BuilderRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCondBr" buildCondBr
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSwitch" buildSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIndirectBr" buildIndirectBr
-    :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke" buildInvoke
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInvoke2" buildInvoke2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUnreachable" buildUnreachable
-    :: BuilderRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildResume" buildResume
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLandingPad" buildLandingPad
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupRet" buildCleanupRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchRet" buildCatchRet
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchPad" buildCatchPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCleanupPad" buildCleanupPad
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCatchSwitch" buildCatchSwitch
-    :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddCase" addCase
-    :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddDestination" addDestination
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumClauses" getNumClauses
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetClause" getClause
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMAddClause" addClause
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMIsCleanup" isCleanup
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetCleanup" setCleanup
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMAddHandler" addHandler
-    :: ValueRef -> BasicBlockRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetNumHandlers" getNumHandlers
-    :: ValueRef -> IO CUInt
-
-foreign import ccall unsafe "LLVMGetHandlers" getHandlers
-    :: ValueRef -> (Ptr BasicBlockRef) -> IO ()
-
-foreign import ccall unsafe "LLVMGetArgOperand" getArgOperand
-    :: ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetArgOperand" setArgOperand
-    :: ValueRef -> CUInt -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetParentCatchSwitch" getParentCatchSwitch
-    :: ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMSetParentCatchSwitch" setParentCatchSwitch
-    :: ValueRef -> ValueRef -> IO ()
-
-foreign import ccall unsafe "LLVMBuildAdd" buildAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWAdd" buildNSWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWAdd" buildNUWAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFAdd" buildFAdd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSub" buildSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWSub" buildNSWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWSub" buildNUWSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFSub" buildFSub
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMul" buildMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWMul" buildNSWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWMul" buildNUWMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFMul" buildFMul
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUDiv" buildUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactUDiv" buildExactUDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSDiv" buildSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExactSDiv" buildExactSDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFDiv" buildFDiv
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildURem" buildURem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSRem" buildSRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFRem" buildFRem
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShl" buildShl
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLShr" buildLShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAShr" buildAShr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAnd" buildAnd
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildOr" buildOr
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildXor" buildXor
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBinOp" buildBinOp
-    :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNeg" buildNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNSWNeg" buildNSWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNUWNeg" buildNUWNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFNeg" buildFNeg
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildNot" buildNot
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMalloc" buildMalloc
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayMalloc" buildArrayMalloc
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemSet" buildMemSet
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CUInt -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemCpy" buildMemCpy
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildMemMove" buildMemMove
-    :: BuilderRef -> ValueRef -> CUInt -> ValueRef -> CUInt -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAlloca" buildAlloca
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildArrayAlloca" buildArrayAlloca
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFree" buildFree
-    :: BuilderRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad" buildLoad
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildLoad2" buildLoad2
-    :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStore" buildStore
-    :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP" buildGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP" buildInBoundsGEP
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP" buildStructGEP
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGEP2" buildGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInBoundsGEP2" buildInBoundsGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildStructGEP2" buildStructGEP2
-    :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalString" buildGlobalString
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildGlobalStringPtr" buildGlobalStringPtr
-    :: BuilderRef -> CString -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMGetVolatile" getVolatile
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetVolatile" setVolatile
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetOrdering" getOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetOrdering" setOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMBuildTrunc" buildTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExt" buildZExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExt" buildSExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToUI" buildFPToUI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPToSI" buildFPToSI
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildUIToFP" buildUIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSIToFP" buildSIToFP
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPTrunc" buildFPTrunc
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPExt" buildFPExt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrToInt" buildPtrToInt
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntToPtr" buildIntToPtr
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildBitCast" buildBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAddrSpaceCast" buildAddrSpaceCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildZExtOrBitCast" buildZExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSExtOrBitCast" buildSExtOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildTruncOrBitCast" buildTruncOrBitCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCast" buildCast
-    :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPointerCast" buildPointerCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIntCast2" buildIntCast2
-    :: BuilderRef -> ValueRef -> TypeRef -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFPCast" buildFPCast
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildICmp" buildICmp
-    :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFCmp" buildFCmp
-    :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPhi" buildPhi
-    :: BuilderRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall" buildCall
-    :: BuilderRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildCall2" buildCall2
-    :: BuilderRef -> TypeRef -> ValueRef -> (Ptr ValueRef) -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildSelect" buildSelect
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildVAArg" buildVAArg
-    :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractElement" buildExtractElement
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertElement" buildInsertElement
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildShuffleVector" buildShuffleVector
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildExtractValue" buildExtractValue
-    :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildInsertValue" buildInsertValue
-    :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNull" buildIsNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildIsNotNull" buildIsNotNull
-    :: BuilderRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildPtrDiff" buildPtrDiff
-    :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildFence" buildFence
-    :: BuilderRef -> AtomicOrdering -> LLVM.Bool -> CString -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicRMW" buildAtomicRMW
-    :: BuilderRef -> AtomicRMWBinOp -> ValueRef -> ValueRef -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMBuildAtomicCmpXchg" buildAtomicCmpXchg
-    :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> AtomicOrdering -> AtomicOrdering -> LLVM.Bool -> IO ValueRef
-
-foreign import ccall unsafe "LLVMIsAtomicSingleThread" isAtomicSingleThread
-    :: ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMSetAtomicSingleThread" setAtomicSingleThread
-    :: ValueRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgSuccessOrdering" getCmpXchgSuccessOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgSuccessOrdering" setCmpXchgSuccessOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMGetCmpXchgFailureOrdering" getCmpXchgFailureOrdering
-    :: ValueRef -> IO AtomicOrdering
-
-foreign import ccall unsafe "LLVMSetCmpXchgFailureOrdering" setCmpXchgFailureOrdering
-    :: ValueRef -> AtomicOrdering -> IO ()
-
-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule" createModuleProviderForExistingModule
-    :: ModuleRef -> IO ModuleProviderRef
-
-foreign import ccall unsafe "LLVMDisposeModuleProvider" disposeModuleProvider
-    :: ModuleProviderRef -> IO ()
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile
-    :: CString -> (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithSTDIN" createMemoryBufferWithSTDIN
-    :: (Ptr MemoryBufferRef) -> (Ptr CString) -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRange" createMemoryBufferWithMemoryRange
-    :: CString -> CSize -> CString -> LLVM.Bool -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMCreateMemoryBufferWithMemoryRangeCopy" createMemoryBufferWithMemoryRangeCopy
-    :: CString -> CSize -> CString -> IO MemoryBufferRef
-
-foreign import ccall unsafe "LLVMGetBufferStart" getBufferStart
-    :: MemoryBufferRef -> IO CString
-
-foreign import ccall unsafe "LLVMGetBufferSize" getBufferSize
-    :: MemoryBufferRef -> IO CSize
-
-foreign import ccall unsafe "LLVMDisposeMemoryBuffer" disposeMemoryBuffer
-    :: MemoryBufferRef -> IO ()
-
-foreign import ccall unsafe "LLVMGetGlobalPassRegistry" getGlobalPassRegistry
-    :: IO PassRegistryRef
-
-foreign import ccall unsafe "LLVMCreatePassManager" createPassManager
-    :: IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule
-    :: ModuleRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager
-    :: ModuleProviderRef -> IO PassManagerRef
-
-foreign import ccall unsafe "LLVMRunPassManager" runPassManager
-    :: PassManagerRef -> ModuleRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMRunFunctionPassManager" runFunctionPassManager
-    :: PassManagerRef -> ValueRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMFinalizeFunctionPassManager" finalizeFunctionPassManager
-    :: PassManagerRef -> IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMDisposePassManager" disposePassManager
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMStartMultithreaded" startMultithreaded
-    :: IO LLVM.Bool
-
-foreign import ccall unsafe "LLVMStopMultithreaded" stopMultithreaded
-    :: IO ()
-
-foreign import ccall unsafe "LLVMIsMultithreaded" isMultithreaded
-    :: IO LLVM.Bool
diff --git a/src/LLVM/FFI/Core.hsc b/src/LLVM/FFI/Core.hsc
--- a/src/LLVM/FFI/Core.hsc
+++ b/src/LLVM/FFI/Core.hsc
@@ -16,8 +16,7 @@
 
 module LLVM.FFI.Core
     (
-      initializeCore
-    , Version.version
+      Version.version
 
     -- * Boolean values
     , LLVM.Bool(LLVM.Bool)
@@ -179,8 +178,6 @@
     , mDNodeInContext
     , mDNode
     , getMDString
---    , getMDNodeNumOperands
---    , getMDNodeOperand
     , getNamedMetadataNumOperands
     , getNamedMetadataOperands
 
@@ -249,7 +246,6 @@
     , constPointerCast
     , constIntCast
     , constFPCast
-    , constSelect
     , constExtractElement
     , constInsertElement
     , constShuffleVector
@@ -563,7 +559,6 @@
     -- ** Raw.PassRegistry
     , Raw.PassRegistry
     , PassRegistryRef
-    , getGlobalPassRegistry
 
     -- ** Pass manager
     , Raw.PassManager
@@ -875,10 +870,6 @@
 
 
 
--- ** Initialization
-initializeCore :: PassRegistryRef -> IO ()
-initializeCore = Raw.initializeCore
-
 -- ** Error Handling
 disposeMessage :: CString -> IO ()
 disposeMessage = Raw.disposeMessage
@@ -1275,14 +1266,6 @@
 getMDString :: ValueRef -> Ptr CUInt -> IO CString
 getMDString = Raw.getMDString
 
-{-
-getMDNodeNumOperands :: ValueRef -> IO CInt
-getMDNodeNumOperands = Raw.getMDNodeNumOperands
-
-getMDNodeOperand :: ValueRef -> CUInt -> IO (Ptr ValueRef)
-getMDNodeOperand = Raw.getMDNodeOperand
--}
-
 getNamedMetadataNumOperands :: ModuleRef -> CString -> IO CUInt
 getNamedMetadataNumOperands = Raw.getNamedMetadataNumOperands
 
@@ -1475,9 +1458,6 @@
 constFPCast :: ValueRef -> TypeRef -> IO ValueRef
 constFPCast = Raw.constFPCast
 
-constSelect :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
-constSelect = Raw.constSelect
-
 constExtractElement :: ValueRef -> ValueRef -> IO ValueRef
 constExtractElement = Raw.constExtractElement
 
@@ -2190,11 +2170,6 @@
 
 disposeMemoryBuffer :: MemoryBufferRef -> IO ()
 disposeMemoryBuffer = Raw.disposeMemoryBuffer
-
-
--- ** Pass Registry
-getGlobalPassRegistry :: IO PassRegistryRef
-getGlobalPassRegistry = Raw.getGlobalPassRegistry
 
 
 -- ** Pass Managers
diff --git a/src/LLVM/FFI/Error.hs b/src/LLVM/FFI/Error.hs
new file mode 100644
--- /dev/null
+++ b/src/LLVM/FFI/Error.hs
@@ -0,0 +1,44 @@
+{-# LANGUAGE Safe #-}
+{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE EmptyDataDecls #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+
+module LLVM.FFI.Error where
+
+import qualified Foreign.C.Types as C
+import Foreign.C.String (CString)
+import Foreign.Ptr (Ptr)
+
+import Data.Typeable (Typeable)
+
+
+type CUInt = C.CUInt
+type CInt = C.CInt
+
+
+data Error
+    deriving (Typeable)
+type ErrorRef = Ptr Error
+
+data ErrorTypeIdObj
+    deriving (Typeable)
+type ErrorTypeId = Ptr ErrorTypeIdObj
+
+
+foreign import ccall unsafe "LLVMGetErrorTypeId" getErrorTypeId
+    :: ErrorRef -> IO ErrorTypeId
+
+foreign import ccall unsafe "LLVMConsumeError" consumeError
+    :: ErrorRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetErrorMessage" getErrorMessage
+    :: ErrorRef -> IO CString
+
+foreign import ccall unsafe "LLVMDisposeErrorMessage" disposeErrorMessage
+    :: CString -> IO ()
+
+foreign import ccall unsafe "LLVMGetStringErrorTypeId" getStringErrorTypeId
+    :: IO ErrorTypeId
+
+foreign import ccall unsafe "LLVMCreateStringError" createStringError
+    :: CString -> IO ErrorRef
diff --git a/src/LLVM/FFI/ExecutionEngine.hs b/src/LLVM/FFI/ExecutionEngine.hs
--- a/src/LLVM/FFI/ExecutionEngine.hs
+++ b/src/LLVM/FFI/ExecutionEngine.hs
@@ -49,6 +49,9 @@
     , recompileAndRelinkFunction
     , runFunction
     , getExecutionEngineTargetData
+    , TargetMachine
+    , TargetMachineRef
+    , getExecutionEngineTargetMachine
     , addGlobalMapping
     , addFunctionMapping
     , getPointerToGlobal
@@ -80,6 +83,10 @@
     deriving (Typeable)
 type ExecutionEngineRef = Ptr ExecutionEngine
 
+data TargetMachine
+    deriving (Typeable)
+type TargetMachineRef = Ptr TargetMachine
+
 data GenericValue
     deriving (Typeable)
 type GenericValueRef = Ptr GenericValue
@@ -189,6 +196,9 @@
     :: ExecutionEngineRef -> ValueRef -> IO (FunPtr a)
 foreign import ccall unsafe "LLVMGetExecutionEngineTargetData" getExecutionEngineTargetData
     :: ExecutionEngineRef -> IO TargetDataRef
+foreign import ccall unsafe "LLVMGetExecutionEngineTargetMachine" getExecutionEngineTargetMachine
+    :: ExecutionEngineRef -> IO TargetMachineRef
+
 {- |
 disfunctional in LLVM-3.6,
 see <https://llvm.org/bugs/show_bug.cgi?id=20656>
diff --git a/src/LLVM/FFI/Support/Host.hs b/src/LLVM/FFI/Support/Host.hs
--- a/src/LLVM/FFI/Support/Host.hs
+++ b/src/LLVM/FFI/Support/Host.hs
@@ -8,7 +8,6 @@
     FeatureMapRef,
     FeatureIterator,
     FeatureIteratorRef,
-    getHostCPUName,
     getHostFeatures,
     freeFeatures,
     getFirstFeature,
@@ -22,9 +21,6 @@
 import Foreign.Ptr (Ptr)
 
 import Data.Typeable (Typeable)
-
-
-foreign import ccall unsafe "LLVMGetHostCPUName" getHostCPUName :: IO CString
 
 
 data FeatureMap
diff --git a/src/LLVM/FFI/TargetMachine.hsc b/src/LLVM/FFI/TargetMachine.hsc
new file mode 100644
--- /dev/null
+++ b/src/LLVM/FFI/TargetMachine.hsc
@@ -0,0 +1,164 @@
+{-# LANGUAGE Safe #-}
+{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE EmptyDataDecls #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+
+module LLVM.FFI.TargetMachine where
+
+
+import qualified LLVM.FFI.Core as LLVM
+import LLVM.FFI.Target (TargetDataRef)
+import LLVM.FFI.Core (ModuleRef, PassManagerRef, MemoryBufferRef)
+
+import qualified Foreign.C.Types as C
+import Foreign.C.String (CString)
+import Foreign.Ptr (Ptr)
+
+import Data.Typeable (Typeable)
+import Data.Word (Word32)
+
+
+type CUInt = C.CUInt
+type CInt = C.CInt
+type Triple = CString
+type ErrorMessage = CString
+
+
+#include <llvm-c/TargetMachine.h>
+
+newtype CodeGenOptLevel = CodeGenOptLevel (#type LLVMCodeGenOptLevel)
+    deriving (Eq)
+
+codeGenLevelNone, codeGenLevelLess :: CodeGenOptLevel
+codeGenLevelDefault, codeGenLevelAggressive :: CodeGenOptLevel
+codeGenLevelNone       = CodeGenOptLevel (#const LLVMCodeGenLevelNone)
+codeGenLevelLess       = CodeGenOptLevel (#const LLVMCodeGenLevelLess)
+codeGenLevelDefault    = CodeGenOptLevel (#const LLVMCodeGenLevelDefault)
+codeGenLevelAggressive = CodeGenOptLevel (#const LLVMCodeGenLevelAggressive)
+
+newtype RelocMode = RelocMode (#type LLVMRelocMode)
+    deriving (Eq)
+
+relocDefault      :: RelocMode
+relocStatic       :: RelocMode
+relocPIC          :: RelocMode
+relocDynamicNoPic :: RelocMode
+relocROPI         :: RelocMode
+relocRWPI         :: RelocMode
+relocROPI_RWPI    :: RelocMode
+
+relocDefault      = RelocMode (#const LLVMRelocDefault)
+relocStatic       = RelocMode (#const LLVMRelocStatic)
+relocPIC          = RelocMode (#const LLVMRelocPIC)
+relocDynamicNoPic = RelocMode (#const LLVMRelocDynamicNoPic)
+relocROPI         = RelocMode (#const LLVMRelocROPI)
+relocRWPI         = RelocMode (#const LLVMRelocRWPI)
+relocROPI_RWPI    = RelocMode (#const LLVMRelocROPI_RWPI)
+
+newtype CodeModel = CodeModel (#type LLVMCodeModel)
+    deriving (Eq)
+
+codeModelDefault    :: CodeModel
+codeModelJITDefault :: CodeModel
+codeModelTiny       :: CodeModel
+codeModelSmall      :: CodeModel
+codeModelKernel     :: CodeModel
+codeModelMedium     :: CodeModel
+codeModelLarge      :: CodeModel
+
+codeModelDefault    = CodeModel (#const LLVMCodeModelDefault)
+codeModelJITDefault = CodeModel (#const LLVMCodeModelJITDefault)
+codeModelTiny       = CodeModel (#const LLVMCodeModelTiny)
+codeModelSmall      = CodeModel (#const LLVMCodeModelSmall)
+codeModelKernel     = CodeModel (#const LLVMCodeModelKernel)
+codeModelMedium     = CodeModel (#const LLVMCodeModelMedium)
+codeModelLarge      = CodeModel (#const LLVMCodeModelLarge)
+
+newtype CodeGenFileType = CodeGenFileType (#type LLVMCodeGenFileType)
+    deriving (Eq)
+
+assemblyFile, objectFile :: CodeGenFileType
+assemblyFile = CodeGenFileType (#const LLVMAssemblyFile)
+objectFile   = CodeGenFileType (#const LLVMObjectFile)
+
+
+data TargetMachine
+    deriving (Typeable)
+type TargetMachineRef = Ptr TargetMachine
+
+data Target
+    deriving (Typeable)
+type TargetRef = Ptr Target
+
+
+foreign import ccall unsafe "LLVMGetFirstTarget" getFirstTarget
+    :: IO TargetRef
+
+foreign import ccall unsafe "LLVMGetNextTarget" getNextTarget
+    :: TargetRef -> IO TargetRef
+
+foreign import ccall unsafe "LLVMGetTargetFromName" getTargetFromName
+    :: CString -> IO TargetRef
+
+foreign import ccall unsafe "LLVMGetTargetFromTriple" getTargetFromTriple
+    :: Triple -> (Ptr TargetRef) -> (Ptr CString) -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetTargetName" getTargetName
+    :: TargetRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetTargetDescription" getTargetDescription
+    :: TargetRef -> IO CString
+
+foreign import ccall unsafe "LLVMTargetHasJIT" targetHasJIT
+    :: TargetRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMTargetHasTargetMachine" targetHasTargetMachine
+    :: TargetRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMTargetHasAsmBackend" targetHasAsmBackend
+    :: TargetRef -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMCreateTargetMachine" createTargetMachine
+    :: TargetRef -> CString -> CString -> CString -> CodeGenOptLevel -> RelocMode -> CodeModel -> IO TargetMachineRef
+
+foreign import ccall unsafe "LLVMDisposeTargetMachine" disposeTargetMachine
+    :: TargetMachineRef -> IO ()
+
+foreign import ccall unsafe "LLVMGetTargetMachineTarget" getTargetMachineTarget
+    :: TargetMachineRef -> IO TargetRef
+
+foreign import ccall unsafe "LLVMGetTargetMachineTriple" getTargetMachineTriple
+    :: TargetMachineRef -> IO Triple
+
+foreign import ccall unsafe "LLVMGetTargetMachineCPU" getTargetMachineCPU
+    :: TargetMachineRef -> IO CString
+
+foreign import ccall unsafe "LLVMGetTargetMachineFeatureString" getTargetMachineFeatureString
+    :: TargetMachineRef -> IO CString
+
+foreign import ccall unsafe "LLVMCreateTargetDataLayout" createTargetDataLayout
+    :: TargetMachineRef -> IO TargetDataRef
+
+foreign import ccall unsafe "LLVMSetTargetMachineAsmVerbosity" setTargetMachineAsmVerbosity
+    :: TargetMachineRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMTargetMachineEmitToFile" targetMachineEmitToFile
+    :: TargetMachineRef -> ModuleRef -> CString -> CodeGenFileType -> Ptr ErrorMessage -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMTargetMachineEmitToMemoryBuffer" targetMachineEmitToMemoryBuffer
+    :: TargetMachineRef -> ModuleRef -> CodeGenFileType -> Ptr ErrorMessage -> (Ptr MemoryBufferRef) -> IO LLVM.Bool
+
+foreign import ccall unsafe "LLVMGetDefaultTargetTriple" getDefaultTargetTriple
+    :: IO Triple
+
+foreign import ccall unsafe "LLVMNormalizeTargetTriple" normalizeTargetTriple
+    :: Triple -> IO CString
+
+foreign import ccall unsafe "LLVMGetHostCPUName" getHostCPUName
+    :: IO CString
+
+foreign import ccall unsafe "LLVMGetHostCPUFeatures" getHostCPUFeatures
+    :: IO CString
+
+foreign import ccall unsafe "LLVMAddAnalysisPasses" addAnalysisPasses
+    :: TargetMachineRef -> PassManagerRef -> IO ()
diff --git a/src/LLVM/FFI/Transforms/IPO.hs b/src/LLVM/FFI/Transforms/IPO.hs
deleted file mode 100644
--- a/src/LLVM/FFI/Transforms/IPO.hs
+++ /dev/null
@@ -1,31 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-
-module LLVM.FFI.Transforms.IPO where
-
-import LLVM.FFI.Core (PassManagerRef)
-
-
-foreign import ccall unsafe "LLVMAddConstantMergePass" addConstantMergePass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddDeadArgEliminationPass" addDeadArgEliminationPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddFunctionAttrsPass" addFunctionAttrsPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddFunctionInliningPass" addFunctionInliningPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddAlwaysInlinerPass" addAlwaysInlinerPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddGlobalDCEPass" addGlobalDCEPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddGlobalOptimizerPass" addGlobalOptimizerPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddIPSCCPPass" addIPSCCPPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddInternalizePass" addInternalizePass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddStripDeadPrototypesPass" addStripDeadPrototypesPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddStripSymbolsPass" addStripSymbolsPass
-    :: PassManagerRef -> IO ()
diff --git a/src/LLVM/FFI/Transforms/PassBuilder.hs b/src/LLVM/FFI/Transforms/PassBuilder.hs
new file mode 100644
--- /dev/null
+++ b/src/LLVM/FFI/Transforms/PassBuilder.hs
@@ -0,0 +1,69 @@
+{-# LANGUAGE Safe #-}
+{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE EmptyDataDecls #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+
+module LLVM.FFI.Transforms.PassBuilder where
+
+import qualified LLVM.FFI.Core as LLVM
+import LLVM.FFI.TargetMachine (TargetMachineRef)
+import LLVM.FFI.Error (ErrorRef)
+import LLVM.FFI.Core (ModuleRef)
+
+import qualified Foreign.C.Types as C
+import Foreign.C.String (CString)
+import Foreign.Ptr (Ptr)
+
+import Data.Typeable (Typeable)
+
+
+type CUInt = C.CUInt
+type CInt = C.CInt
+
+
+data PassBuilderOptions
+    deriving (Typeable)
+type PassBuilderOptionsRef = Ptr PassBuilderOptions
+
+
+foreign import ccall unsafe "LLVMRunPasses" runPasses
+    :: ModuleRef -> CString -> TargetMachineRef -> PassBuilderOptionsRef -> IO ErrorRef
+
+foreign import ccall unsafe "LLVMCreatePassBuilderOptions" createPassBuilderOptions
+    :: IO PassBuilderOptionsRef
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetVerifyEach" passBuilderOptionsSetVerifyEach
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetDebugLogging" passBuilderOptionsSetDebugLogging
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetLoopInterleaving" passBuilderOptionsSetLoopInterleaving
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetLoopVectorization" passBuilderOptionsSetLoopVectorization
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetSLPVectorization" passBuilderOptionsSetSLPVectorization
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetLoopUnrolling" passBuilderOptionsSetLoopUnrolling
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll" passBuilderOptionsSetForgetAllSCEVInLoopUnroll
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetLicmMssaOptCap" passBuilderOptionsSetLicmMssaOptCap
+    :: PassBuilderOptionsRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap" passBuilderOptionsSetLicmMssaNoAccForPromotionCap
+    :: PassBuilderOptionsRef -> CUInt -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetCallGraphProfile" passBuilderOptionsSetCallGraphProfile
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMPassBuilderOptionsSetMergeFunctions" passBuilderOptionsSetMergeFunctions
+    :: PassBuilderOptionsRef -> LLVM.Bool -> IO ()
+
+foreign import ccall unsafe "LLVMDisposePassBuilderOptions" disposePassBuilderOptions
+    :: PassBuilderOptionsRef -> IO ()
diff --git a/src/LLVM/FFI/Transforms/PassManagerBuilder.hs b/src/LLVM/FFI/Transforms/PassManagerBuilder.hs
deleted file mode 100644
--- a/src/LLVM/FFI/Transforms/PassManagerBuilder.hs
+++ /dev/null
@@ -1,53 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-
-module LLVM.FFI.Transforms.PassManagerBuilder where
-
-import qualified LLVM.FFI.Core as LLVM
-import LLVM.FFI.Core (PassManagerRef)
-
-import qualified Foreign.C.Types as C
-import Foreign.Ptr (Ptr)
-
-import Data.Typeable (Typeable)
-
-
-type CUInt = C.CUInt
-
-
-data PassManagerBuilder
-    deriving (Typeable)
-type PassManagerBuilderRef = Ptr PassManagerBuilder
-
-
-foreign import ccall unsafe "LLVMPassManagerBuilderCreate" create
-    :: IO PassManagerBuilderRef
-
-foreign import ccall unsafe "LLVMPassManagerBuilderDispose" dispose
-    :: PassManagerBuilderRef -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderSetOptLevel" setOptLevel
-    :: PassManagerBuilderRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderSetSizeLevel" setSizeLevel
-    :: PassManagerBuilderRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderSetDisableUnitAtATime" setDisableUnitAtATime
-    :: PassManagerBuilderRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderSetDisableUnrollLoops" setDisableUnrollLoops
-    :: PassManagerBuilderRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderSetDisableSimplifyLibCalls" setDisableSimplifyLibCalls
-    :: PassManagerBuilderRef -> LLVM.Bool -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderUseInlinerWithThreshold" useInlinerWithThreshold
-    :: PassManagerBuilderRef -> CUInt -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderPopulateFunctionPassManager" populateFunctionPassManager
-    :: PassManagerBuilderRef -> PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMPassManagerBuilderPopulateModulePassManager" populateModulePassManager
-    :: PassManagerBuilderRef -> PassManagerRef -> IO ()
diff --git a/src/LLVM/FFI/Transforms/Scalar.hs b/src/LLVM/FFI/Transforms/Scalar.hs
deleted file mode 100644
--- a/src/LLVM/FFI/Transforms/Scalar.hs
+++ /dev/null
@@ -1,66 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE EmptyDataDecls #-}
-
-module LLVM.FFI.Transforms.Scalar where
-
-import LLVM.FFI.Core (PassManagerRef)
-
-
-foreign import ccall unsafe "LLVMAddAggressiveDCEPass" addAggressiveDCEPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddCFGSimplificationPass" addCFGSimplificationPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddDeadStoreEliminationPass" addDeadStoreEliminationPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddGVNPass" addGVNPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddIndVarSimplifyPass" addIndVarSimplifyPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddInstructionCombiningPass" addInstructionCombiningPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddJumpThreadingPass" addJumpThreadingPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLICMPass" addLICMPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLoopDeletionPass" addLoopDeletionPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLoopIdiomPass" addLoopIdiomPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLoopRotatePass" addLoopRotatePass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLoopUnrollPass" addLoopUnrollPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddMemCpyOptPass" addMemCpyOptPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddPromoteMemoryToRegisterPass" addPromoteMemoryToRegisterPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddReassociatePass" addReassociatePass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddSCCPPass" addSCCPPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddScalarReplAggregatesPass" addScalarReplAggregatesPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddScalarReplAggregatesPassSSA" addScalarReplAggregatesPassSSA
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddScalarReplAggregatesPassWithThreshold"
-        addScalarReplAggregatesPassWithThreshold
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddSimplifyLibCallsPass" addSimplifyLibCallsPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddTailCallEliminationPass" addTailCallEliminationPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddDemoteMemoryToRegisterPass" addDemoteMemoryToRegisterPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddVerifierPass" addVerifierPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddCorrelatedValuePropagationPass" addCorrelatedValuePropagationPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddEarlyCSEPass" addEarlyCSEPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddLowerExpectIntrinsicPass" addLowerExpectIntrinsicPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddTypeBasedAliasAnalysisPass" addTypeBasedAliasAnalysisPass
-    :: PassManagerRef -> IO ()
-foreign import ccall unsafe "LLVMAddBasicAliasAnalysisPass" addBasicAliasAnalysisPass
-    :: PassManagerRef -> IO ()
diff --git a/src/LLVM/FFI/Transforms/Vectorize.hs b/src/LLVM/FFI/Transforms/Vectorize.hs
deleted file mode 100644
--- a/src/LLVM/FFI/Transforms/Vectorize.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-module LLVM.FFI.Transforms.Vectorize where
-
-import LLVM.FFI.Core (PassManagerRef)
-
-
-foreign import ccall unsafe "LLVMAddLoopVectorizePass" addLoopPass
-    :: PassManagerRef -> IO ()
-
-foreign import ccall unsafe "LLVMAddSLPVectorizePass" addSLPPass
-    :: PassManagerRef -> IO ()
