comparison gen/rttibuilder.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 d6e8d5db259f
children
comparison
equal deleted inserted replaced
1568:a591aa6bd6dc 1569:755abafbf25d
140 } 140 }
141 141
142 void RTTIBuilder::finalize(IrGlobal* tid) 142 void RTTIBuilder::finalize(IrGlobal* tid)
143 { 143 {
144 // create the inititalizer 144 // create the inititalizer
145 LLConstant* tiInit = LLConstantStruct::get(&inits[0], inits.size(), false); 145 LLConstant* tiInit = LLConstantStruct::get(gIR->context(), &inits[0], inits.size(), false);
146 146
147 // refine global type 147 // refine global type
148 llvm::cast<llvm::OpaqueType>(tid->type.get())->refineAbstractTypeTo(tiInit->getType()); 148 llvm::cast<llvm::OpaqueType>(tid->type.get())->refineAbstractTypeTo(tiInit->getType());
149 149
150 // set the initializer 150 // set the initializer
152 } 152 }
153 153
154 LLConstant* RTTIBuilder::get_constant() 154 LLConstant* RTTIBuilder::get_constant()
155 { 155 {
156 // just return the inititalizer 156 // just return the inititalizer
157 return LLConstantStruct::get(&inits[0], inits.size(), false); 157 return LLConstantStruct::get(gIR->context(), &inits[0], inits.size(), false);
158 } 158 }