diff -up lightspark-0.7.2/conf/FindLLVM.cmake.llvm33 lightspark-0.7.2/conf/FindLLVM.cmake --- lightspark-0.7.2/conf/FindLLVM.cmake.llvm33 2013-03-16 12:19:18.000000000 +0100 +++ lightspark-0.7.2/conf/FindLLVM.cmake 2013-05-11 11:57:36.455450049 +0200 @@ -168,11 +168,16 @@ else (LLVM_INCLUDE_DIR) set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR}) check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H) + check_include_file_cxx("llvm/IR/DataLayout.h" HAVE_IR_DATALAYOUT_H) unset(CMAKE_REQUIRED_INCLUDES) MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H}) + MESSAGE(STATUS "HAVE_IR_DATALAYOUT_H: " ${HAVE_IR_DATALAYOUT_H}) IF(HAVE_DATALAYOUT_H) ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H) ENDIF(HAVE_DATALAYOUT_H) + IF(HAVE_IR_DATALAYOUT_H) + ADD_DEFINITIONS(-DHAVE_IR_DATALAYOUT_H) + ENDIF(HAVE_IR_DATALAYOUT_H) exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) diff -up lightspark-0.7.2/src/scripting/abc.cpp.llvm33 lightspark-0.7.2/src/scripting/abc.cpp --- lightspark-0.7.2/src/scripting/abc.cpp.llvm33 2013-03-16 12:19:18.000000000 +0100 +++ lightspark-0.7.2/src/scripting/abc.cpp 2013-05-11 11:57:36.451450048 +0200 @@ -23,12 +23,19 @@ #include "compat.h" -#include #include #include #include -#include -#ifdef HAVE_DATALAYOUT_H +#ifdef HAVE_IR_DATALAYOUT_H +# include +# include +#else +# include +# include +#endif +#ifdef HAVE_IR_DATALAYOUT_H +# include +#elif defined HAVE_DATALAYOUT_H # include #else # include @@ -1489,7 +1496,7 @@ void ABCVm::Run(ABCVm* th) assert_and_throw(th->ex); th->FPM=new llvm::FunctionPassManager(th->module); -#ifdef HAVE_DATALAYOUT_H +#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H th->FPM->add(new llvm::DataLayout(*th->ex->getDataLayout())); #else th->FPM->add(new llvm::TargetData(*th->ex->getTargetData())); diff -up lightspark-0.7.2/src/scripting/abc_codesynt.cpp.llvm33 lightspark-0.7.2/src/scripting/abc_codesynt.cpp --- lightspark-0.7.2/src/scripting/abc_codesynt.cpp.llvm33 2013-03-16 12:19:18.000000000 +0100 +++ lightspark-0.7.2/src/scripting/abc_codesynt.cpp 2013-05-11 11:59:23.066458300 +0200 @@ -25,18 +25,29 @@ #endif #include "compat.h" -#include -#include #include #include -#include -#ifdef HAVE_IRBUILDER_H +#ifdef HAVE_IR_DATALAYOUT_H +# include +# include +# include +# include +#else +# include +# include +# include +# include +#endif +#ifdef HAVE_IR_DATALAYOUT_H +# include +#elif defined HAVE_IRBUILDER_H # include #else # include #endif -#include -#ifdef HAVE_DATALAYOUT_H +#ifdef HAVE_IR_DATALAYOUT_H +# include +#elif defined HAVE_DATALAYOUT_H # include #else # include @@ -279,7 +290,7 @@ void ABCVm::registerFunctions() llvm::FunctionType* FT=NULL; //Create types -#ifdef HAVE_DATALAYOUT_H +#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H ptr_type=ex->getDataLayout()->getIntPtrType(llvm_context()); #else ptr_type=ex->getTargetData()->getIntPtrType(llvm_context());