diff options
-rw-r--r-- | src/llvm.cpp | 8 | ||||
-rw-r--r-- | wscript | 13 |
2 files changed, 6 insertions, 15 deletions
diff --git a/src/llvm.cpp b/src/llvm.cpp index 3110c72..4481b52 100644 --- a/src/llvm.cpp +++ b/src/llvm.cpp @@ -32,19 +32,19 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Assembly/AssemblyAnnotationWriter.h" +#include "llvm/DataLayout.h" #include "llvm/DefaultPasses.h" #include "llvm/DerivedTypes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JIT.h" #include "llvm/ExecutionEngine/JITMemoryManager.h" +#include "llvm/IRBuilder.h" #include "llvm/Instructions.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/PassManager.h" -#include "llvm/Support/IRBuilder.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/raw_os_ostream.h" -#include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Value.h" @@ -314,11 +314,11 @@ CVal LLVMEngine::compileCons(CEnv& cenv, const char* tname, const ATuple* type, CVal rtti, const vector<CVal>& fields) { // Find size of memory required - size_t s = engine->getTargetData()->getTypeSizeInBits( + size_t s = engine->getDataLayout()->getTypeSizeInBits( PointerType::get(Type::getInt8Ty(context), 0)); assert(type->begin() != type->end()); for (ATuple::const_iterator i = type->iter_at(1); i != type->end(); ++i) - s += engine->getTargetData()->getTypeSizeInBits( + s += engine->getDataLayout()->getTypeSizeInBits( (Type*)compileType(cenv, (*i)->str(), *i)); // Allocate struct @@ -43,19 +43,10 @@ def configure(conf): conf.env.append_unique('CXXFLAGS', '-std=c++11') conf.check_cfg( - path = 'llvm-config-3.1', + path = 'llvm-config-3.2', args = '--cppflags --ldflags --libs core jit native codegen ipo', package = '', - uselib_store = 'LLVM', - mandatory = False) - - if not conf.is_defined('HAVE_LLVM'): - conf.check_cfg( - path = 'llvm-config-3.0', - args = '--cppflags --ldflags --libs core jit native codegen ipo', - package = '', - uselib_store = 'LLVM', - mandatory = False) + uselib_store = 'LLVM') def build(bld): source = ''' |