Mercurial > projects > ldc
diff gen/runtime.cpp @ 1569:755abafbf25d
Push the context through StructType::get.
Requires LLVM >= 78258. Also remove old #if's.
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Thu, 06 Aug 2009 01:47:39 +0200 |
parents | 259b031f3d22 |
children | 8d086d552909 |
line wrap: on
line diff
--- a/gen/runtime.cpp Thu Aug 06 17:04:36 2009 +0200 +++ b/gen/runtime.cpp Thu Aug 06 01:47:39 2009 +0200 @@ -124,7 +124,7 @@ static const LLType* rt_array(const LLType* elemty) { - return llvm::StructType::get(DtoSize_t(), rt_ptr(elemty), NULL); + return llvm::StructType::get(gIR->context(), DtoSize_t(), rt_ptr(elemty), NULL); } static const LLType* rt_dg1() @@ -133,7 +133,7 @@ types.push_back(rt_ptr(LLType::Int8Ty)); types.push_back(rt_ptr(LLType::Int8Ty)); const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); - return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); + return llvm::StructType::get(gIR->context(), rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); } static const LLType* rt_dg2() @@ -143,7 +143,7 @@ types.push_back(rt_ptr(LLType::Int8Ty)); types.push_back(rt_ptr(LLType::Int8Ty)); const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); - return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); + return llvm::StructType::get(gIR->context(), rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); } static void LLVM_D_BuildRuntimeModule() @@ -169,9 +169,9 @@ else realTy = LLType::DoubleTy; - const LLType* cfloatTy = llvm::StructType::get(floatTy, floatTy, NULL); - const LLType* cdoubleTy = llvm::StructType::get(doubleTy, doubleTy, NULL); - const LLType* crealTy = llvm::StructType::get(realTy, realTy, NULL); + const LLType* cfloatTy = llvm::StructType::get(gIR->context(), floatTy, floatTy, NULL); + const LLType* cdoubleTy = llvm::StructType::get(gIR->context(), doubleTy, doubleTy, NULL); + const LLType* crealTy = llvm::StructType::get(gIR->context(), realTy, realTy, NULL); Logger::println("building aggr types"); const LLType* voidPtrTy = rt_ptr(byteTy);