diff options
Diffstat (limited to 'src/llvm.cpp')
-rw-r--r-- | src/llvm.cpp | 8 |
1 files changed, 4 insertions, 4 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 |