From 39b55e950cb740ce79aa67f600e0f6467d789e40 Mon Sep 17 00:00:00 2001 From: "mdevan.foobar" Date: Thu, 19 Feb 2009 10:43:19 +0000 Subject: [PATCH] Build with LLVM 2.5 (no longer works with 2.4) (Seth Warn, Anthony Desnos) git-svn-id: http://llvm-py.googlecode.com/svn/trunk@60 8d1e9007-1d4e-0410-b67e-1979fd6579aa --- llvm/extra.cpp | 5 ++--- setup.py | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/extra.cpp b/llvm/extra.cpp index 597761d..683e8f5 100644 --- a/llvm/extra.cpp +++ b/llvm/extra.cpp @@ -305,9 +305,8 @@ LLVMModuleRef LLVMGetModuleFromAssembly(const char *asmtext, unsigned txtlen, llvm::Module *modulep; llvm::ParseError error; - if (!(modulep = llvm::ParseAssemblyString(asmtext, NULL /*unused within!*/, - &error))) { - *out = strdup(error.getMessage().c_str()); + if (!(modulep = llvm::ParseAssemblyString(asmtext, NULL, error))) { + *out = strdup(error.getRawMessage().c_str()); return NULL; } diff --git a/setup.py b/setup.py index 100524a..b5a28a5 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ import sys, os from distutils.core import setup, Extension -LLVM_PY_VERSION = '0.5' +LLVM_PY_VERSION = '0.6' def _run(cmd): @@ -93,6 +93,7 @@ def call_setup(llvm_config): 'llvm._core', ['llvm/_core.c', 'llvm/wrap.c', 'llvm/extra.cpp'], define_macros = [ + ('__STDC_CONSTANT_MACROS', None), ('__STDC_LIMIT_MACROS', None), ('_GNU_SOURCE', None)], include_dirs = [incdir],