Mercurial > projects > ldc
comparison gen/typinf.cpp @ 1156:19d4ded7204a
Fixed issue with runtime supplied typeinfo generating multiple symbols.
Added new ldc.llvmasm import in runtime cmake file.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Sat, 28 Mar 2009 09:45:33 +0100 |
parents | 3d1b16dabd25 |
children | 79758fd2f48a |
comparison
equal
deleted
inserted
replaced
1155:ba9d6292572a | 1156:19d4ded7204a |
---|---|
287 | 287 |
288 Logger::println("DtoResolveTypeInfo(%s)", tid->toChars()); | 288 Logger::println("DtoResolveTypeInfo(%s)", tid->toChars()); |
289 LOG_SCOPE; | 289 LOG_SCOPE; |
290 | 290 |
291 IrGlobal* irg = new IrGlobal(tid); | 291 IrGlobal* irg = new IrGlobal(tid); |
292 irg->value = new llvm::GlobalVariable(irg->type.get(), true, | 292 |
293 TYPEINFO_LINKAGE_TYPE, NULL, tid->mangle(), gIR->module); | 293 std::string mangle(tid->mangle()); |
294 | |
295 irg->value = gIR->module->getGlobalVariable(mangle); | |
296 if (!irg->value) | |
297 irg->value = new llvm::GlobalVariable(irg->type.get(), true, | |
298 TYPEINFO_LINKAGE_TYPE, NULL, mangle, gIR->module); | |
294 | 299 |
295 tid->ir.irGlobal = irg; | 300 tid->ir.irGlobal = irg; |
296 | 301 |
297 DtoDeclareTypeInfo(tid); | 302 DtoDeclareTypeInfo(tid); |
298 } | 303 } |