Mercurial > projects > ldc
diff gen/toobj.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 | c03d164e96d9 |
children | 8d086d552909 |
line wrap: on
line diff
--- a/gen/toobj.cpp Thu Aug 06 17:04:36 2009 +0200 +++ b/gen/toobj.cpp Thu Aug 06 01:47:39 2009 +0200 @@ -405,7 +405,7 @@ // the following code generates functions and needs to output // debug info. these macros are useful for that -#define DBG_TYPE ( getPtrToType(llvm::StructType::get(NULL,NULL)) ) +#define DBG_TYPE ( getPtrToType(llvm::StructType::get(gIR->context(),NULL,NULL)) ) #define DBG_CAST(X) ( llvm::ConstantExpr::getBitCast(X, DBG_TYPE) ) // build module ctor @@ -811,7 +811,7 @@ std::vector<const LLType*> magictypes; magictypes.push_back(LLType::Int32Ty); magictypes.push_back(getPtrToType(magicfty)); - const LLStructType* magicsty = LLStructType::get(magictypes); + const LLStructType* magicsty = LLStructType::get(gIR->context(), magictypes); // make the constant element std::vector<LLConstant*> magicconstants;