Mercurial > projects > ldc
changeset 1161:f528e55fb32f
Force initialize the runtime module in Module::genLLVMModule. It is required
for all non-trivial D modules anyway, so why load it lazily? This fixes
run/typeid_83.d (DtoDeclareTypeInfo expects runtime to be initialized)
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 28 Mar 2009 20:01:37 +0100 |
parents | 7d28dcbff23e |
children | 0424e7dfadb1 |
files | gen/runtime.cpp gen/toir.cpp gen/toobj.cpp |
diffstat | 3 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/runtime.cpp Sat Mar 28 19:16:53 2009 +0100 +++ b/gen/runtime.cpp Sat Mar 28 20:01:37 2009 +0100 @@ -36,7 +36,9 @@ Logger::println("*** Initializing D runtime declarations ***"); LOG_SCOPE; - LLVM_D_BuildRuntimeModule(); + if (!M) + LLVM_D_BuildRuntimeModule(); + return true; }
--- a/gen/toir.cpp Sat Mar 28 19:16:53 2009 +0100 +++ b/gen/toir.cpp Sat Mar 28 20:01:37 2009 +0100 @@ -2585,8 +2585,8 @@ void backend_init() { - // now lazily loaded - //LLVM_D_InitRuntime(); + // LLVM_D_InitRuntime is done in Module::genLLVMModule + // since it requires the semantic pass to be done } void backend_term()