comparison gen/todebug.cpp @ 683:b411c41a9716

Only allocate the module file name once. Fixes #90.
author Christian Kamm <kamm incasoftware de>
date Sun, 12 Oct 2008 10:35:16 +0200
parents 6aaa3d3c1183
children 363bb6c0cc80
comparison
equal deleted inserted replaced
682:518b8cc84369 683:b411c41a9716
626 Logger::println("D to dwarf compile_unit"); 626 Logger::println("D to dwarf compile_unit");
627 LOG_SCOPE; 627 LOG_SCOPE;
628 628
629 // we might be generating for an import 629 // we might be generating for an import
630 if (!m->ir.irModule) 630 if (!m->ir.irModule)
631 m->ir.irModule = new IrModule(m); 631 m->ir.irModule = new IrModule(m, m->srcfile->toChars());
632 else if (m->ir.irModule->dwarfCompileUnit) 632 else if (m->ir.irModule->dwarfCompileUnit)
633 { 633 {
634 if (m->ir.irModule->dwarfCompileUnit->getParent() == gIR->module) 634 if (m->ir.irModule->dwarfCompileUnit->getParent() == gIR->module)
635 return m->ir.irModule->dwarfCompileUnit; 635 return m->ir.irModule->dwarfCompileUnit;
636 } 636 }