packages feed

llvm-ffi 3.2.1 → 3.3.0

raw patch · 5 files changed

+33/−59 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

cbits/extra.cpp view
@@ -11,7 +11,7 @@  *    this list of conditions and the following disclaimer in the documentation  *    and/or other materials provided with the distribution.  *- *  * Neither the name of this software, nor the names of its + *  * Neither the name of this software, nor the names of its  *    contributors may be used to endorse or promote products derived from  *    this software without specific prior written permission.  *@@ -41,26 +41,19 @@ #define __STDC_CONSTANT_MACROS #endif -// standard includes-#include <cassert>-#include <cstdlib>-#include <cstring>-#include <sstream>- // LLVM includes-#include "llvm/LLVMContext.h"+#include "llvm/IR/LLVMContext.h"+#include "llvm/IR/Module.h"+#include "llvm/IR/IRBuilder.h"+#include "llvm/IR/Constants.h"+#include "llvm/IR/DerivedTypes.h"+#include "llvm/IR/GlobalVariable.h"+#include "llvm/IR/IntrinsicInst.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Casting.h"-#include "llvm/Constants.h"-#include "llvm/DerivedTypes.h"-#include "llvm/GlobalVariable.h"-#if HS_LLVM_VERSION < 300-#include "llvm/TypeSymbolTable.h"-#endif #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/CallSite.h"-#include "llvm/IntrinsicInst.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Assembly/Parser.h" #ifdef HAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H@@ -237,7 +230,7 @@     } } -LLVMValueRef LLVMBuildRetMultiple(LLVMBuilderRef builder, +LLVMValueRef LLVMBuildRetMultiple(LLVMBuilderRef builder,     LLVMValueRef *values, unsigned n_values) {     assert(values);@@ -251,7 +244,7 @@     return llvm::wrap(builderp->CreateAggregateRet(&values_vec[0], values_vec.size())); } -LLVMValueRef LLVMBuildGetResult(LLVMBuilderRef builder, +LLVMValueRef LLVMBuildGetResult(LLVMBuilderRef builder,     LLVMValueRef value, unsigned index, const char *name) {     assert(name);@@ -366,10 +359,10 @@     assert(modulep);  #if HS_LLVM_VERSION >= 300-    llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep, +    llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep,         llvm::Intrinsic::ID(id), types_vec); #else-    llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep, +    llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep,         llvm::Intrinsic::ID(id), &types_vec[0], types_vec.size()); #endif     return wrap(intfunc);@@ -428,7 +421,7 @@     std::string msg;     bool err; -#if HS_LLVM_VERSION >= 300    +#if HS_LLVM_VERSION >= 300     err = llvm::Linker::LinkModules(destinationp, sourcep, mode, &msg); #else     err = llvm::Linker::LinkModules(destinationp, sourcep, &msg);@@ -525,7 +518,6 @@ define_pass( BlockPlacement ) define_pass( BreakCriticalEdges ) define_pass( CodeGenPrepare )-define_pass( DbgInfoPrinter ) define_pass( DeadCodeElimination ) define_pass( DeadInstElimination ) define_pass( DemoteRegisterToMemory )@@ -541,7 +533,6 @@ define_pass( LCSSA ) define_pass( LoopExtractor ) define_pass( LoopSimplify )-define_pass( LoopStrengthReduce ) define_pass( LowerInvoke ) define_pass( LowerSwitch ) define_pass( MergeFunctions )
cbits/support.cpp view
@@ -7,13 +7,8 @@  #include "llvm-c/Core.h" #include "llvm/PassManager.h"-#if HS_LLVM_VERSION >= 300-# include "llvm/DefaultPasses.h"-# include "llvm/Transforms/IPO/PassManagerBuilder.h"-# include "llvm/Transforms/IPO.h"-#else-# include "llvm/Support/StandardPasses.h"-#endif+#include "llvm/Transforms/IPO/PassManagerBuilder.h"+#include "llvm/Transforms/IPO.h"  #include "support.h" 
include/extra.h view
@@ -11,7 +11,7 @@  *    this list of conditions and the following disclaimer in the documentation  *    and/or other materials provided with the distribution.  *- *  * Neither the name of this software, nor the names of its + *  * Neither the name of this software, nor the names of its  *    contributors may be used to endorse or promote products derived from  *    this software without specific prior written permission.  *@@ -102,14 +102,14 @@ LLVMValueRef LLVMConstVFCmp(LLVMRealPredicate predicate, LLVMValueRef lhs,     LLVMValueRef rhs); -/* Wraps llvm::IRBuilder::CreateVICmp(). */    +/* Wraps llvm::IRBuilder::CreateVICmp(). */ LLVMValueRef LLVMBuildVICmp(LLVMBuilderRef builder, LLVMIntPredicate predicate,     LLVMValueRef lhs, LLVMValueRef rhs, const char *name); -/* Wraps llvm::IRBuilder::CreateVFCmp(). */    +/* Wraps llvm::IRBuilder::CreateVFCmp(). */ LLVMValueRef LLVMBuildVFCmp(LLVMBuilderRef builder, LLVMRealPredicate predicate,     LLVMValueRef lhs, LLVMValueRef rhs, const char *name);-    + /* Wraps llvm::Intrinsic::getDeclaration(). */ LLVMValueRef LLVMGetIntrinsic(LLVMModuleRef builder, int id,     LLVMTypeRef *types, unsigned n_types);@@ -124,12 +124,12 @@ unsigned LLVMModuleGetPointerSize(LLVMModuleRef module);  /* Wraps llvm::Module::getOrInsertFunction(). */-LLVMValueRef LLVMModuleGetOrInsertFunction(LLVMModuleRef module, +LLVMValueRef LLVMModuleGetOrInsertFunction(LLVMModuleRef module,     const char *name, LLVMTypeRef function_type); -/* Wraps llvm::GlobalVariable::hasInitializer(). */    +/* Wraps llvm::GlobalVariable::hasInitializer(). */ int LLVMHasInitializer(LLVMValueRef global_var);-    + /* The following functions wrap various llvm::Instruction::isXXX() functions.  * All of them take an instruction and return 0 (isXXX returned false) or 1  * (isXXX returned false). */@@ -182,12 +182,12 @@  * use, via LLVMDisposeMessage(). */ unsigned LLVMLoadLibraryPermanently(const char* filename, char **errmsg); -/* Wraps llvm::ExecutionEngine::getPointerToFunction(). Returns a pointer +/* Wraps llvm::ExecutionEngine::getPointerToFunction(). Returns a pointer  * to the JITted function. */ void *LLVMGetPointerToFunction(LLVMExecutionEngineRef ee, LLVMValueRef fn); -/* Wraps llvm::InlineFunction(). Inlines a function. C is the call - * instruction, created by LLVMBuildCall. Even if it fails, the Function +/* Wraps llvm::InlineFunction(). Inlines a function. C is the call+ * instruction, created by LLVMBuildCall. Even if it fails, the Function  * containing the call is still in a proper state (not changed). */ int LLVMInlineFunction(LLVMValueRef call); 
llvm-ffi.cabal view
@@ -1,5 +1,5 @@ Name:          llvm-ffi-Version:       3.2.1+Version:       3.3.0 License:       BSD3 License-File:  LICENSE Synopsis:      FFI bindings to the LLVM compiler toolkit.@@ -15,7 +15,7 @@   using the @llvm-pkg-config@ package.   .   We try to stay up to date with LLVM releases.-  The current version of this package is compatible with LLVM 3.2.+  The current version of this package is compatible with LLVM 3.3.   Please understand that the package may or may not work   against older LLVM releases.   We don't have the time or resources to test across multiple releases.@@ -44,7 +44,7 @@   Default: False  Flag specificPkgConfig-  Description: use llvm-3.2.pc instead of llvm.pc+  Description: use llvm-3.3.pc instead of llvm.pc   Default: True  Source-Repository head@@ -52,7 +52,7 @@   Location: http://hub.darcs.net/thielema/llvm-ffi/  Source-Repository this-  Tag:      3.2.1+  Tag:      3.3.0   Type:     darcs   Location: http://hub.darcs.net/thielema/llvm-ffi/ @@ -80,7 +80,6 @@    Other-modules:       LLVM.Target.ARM-      LLVM.Target.CellSPU       LLVM.Target.CppBackend       LLVM.Target.Hexagon       LLVM.Target.MSP430@@ -92,11 +91,11 @@       LLVM.Target.XCore    If flag(specificPkgConfig)-    PkgConfig-Depends: llvm-3.2 == 3.2+    PkgConfig-Depends: llvm-3.3 == 3.3   Else-    PkgConfig-Depends: llvm == 3.2-  CC-Options: -DHS_LLVM_VERSION=302 -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1-  CPP-Options: -DHS_LLVM_VERSION=302+    PkgConfig-Depends: llvm == 3.3+  CC-Options: -DHS_LLVM_VERSION=303 -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1+  CPP-Options: -DHS_LLVM_VERSION=303   CPP-Options: -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS   Include-Dirs: include   C-Sources:
− src/LLVM/Target/CellSPU.hs
@@ -1,11 +0,0 @@-{-# LANGUAGE Safe #-}-{-# LANGUAGE ForeignFunctionInterface #-}-module LLVM.Target.CellSPU(initializeTarget) where--initializeTarget :: IO ()-initializeTarget = do-    initializeCellSPUTargetInfo-    initializeCellSPUTarget--foreign import ccall unsafe "LLVMInitializeCellSPUTargetInfo" initializeCellSPUTargetInfo :: IO ()-foreign import ccall unsafe "LLVMInitializeCellSPUTarget" initializeCellSPUTarget :: IO ()