Mercurial > projects > ldc
comparison gen/statements.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 | 1d5c3354b3c2 |
children | 8d086d552909 |
comparison
equal
deleted
inserted
replaced
1568:a591aa6bd6dc | 1569:755abafbf25d |
---|---|
823 | 823 |
824 // build the static table | 824 // build the static table |
825 std::vector<const LLType*> types; | 825 std::vector<const LLType*> types; |
826 types.push_back(DtoSize_t()); | 826 types.push_back(DtoSize_t()); |
827 types.push_back(elemPtrTy); | 827 types.push_back(elemPtrTy); |
828 const llvm::StructType* sTy = llvm::StructType::get(types); | 828 const llvm::StructType* sTy = llvm::StructType::get(gIR->context(), types); |
829 std::vector<LLConstant*> sinits; | 829 std::vector<LLConstant*> sinits; |
830 sinits.push_back(DtoConstSize_t(inits.size())); | 830 sinits.push_back(DtoConstSize_t(inits.size())); |
831 sinits.push_back(arrPtr); | 831 sinits.push_back(arrPtr); |
832 switchTable = llvm::ConstantStruct::get(sTy, sinits); | 832 switchTable = llvm::ConstantStruct::get(sTy, sinits); |
833 } | 833 } |