diff options
Diffstat (limited to 'llvm.cpp')
-rw-r--r-- | llvm.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -540,6 +540,12 @@ eval(CEnv& cenv, const string& name, istream& is) // Add definitions as GC roots if (result->to<ADefinition*>()) cenv.lock(result); + + // Add types in type substition as GC roots + for (Subst::iterator i = cenv.tsubst.begin(); i != cenv.tsubst.end(); ++i) { + Object::pool.addRoot(i->first); + Object::pool.addRoot(i->second); + } } const Type* ctype = lltype(resultType); |