Mercurial > projects > ldc
diff dmd/template.c @ 946:1714836f2c0b
Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Add getCompilationModule to Dsymbol and fix template compile unit decision code.
Runtime compiles with -g again.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 08 Feb 2009 16:50:22 +0100 |
parents | 39519a1ff603 |
children | 780530d1cad3 |
line wrap: on
line diff
--- a/dmd/template.c Sun Feb 08 05:26:54 2009 +0100 +++ b/dmd/template.c Sun Feb 08 16:50:22 2009 +0100 @@ -2982,7 +2982,12 @@ // get the enclosing template instance from the scope tinst tinst = sc->tinst; - tmodule = sc->module; + + // get the module of the outermost enclosing instantiation + if (tinst) + tmodule = tinst->tmodule; + else + tmodule = sc->module; #if LOG printf("\tdo semantic\n");