@@ -3008,10 +3008,11 @@ namespace Cpp {
30083008 return InstantiateTemplate (TemplateD, TLI, S);
30093009 }
30103010
3011- TCppScope_t InstantiateTemplate (TCppScope_t tmpl,
3011+ TCppScope_t InstantiateTemplate (compat::Interpreter& I, TCppScope_t tmpl,
30123012 const TemplateArgInfo* template_args,
30133013 size_t template_args_size) {
3014- ASTContext &C = getASTContext ();
3014+ auto & S = I.getSema ();
3015+ auto & C = S.getASTContext ();
30153016
30163017 llvm::SmallVector<TemplateArgument> TemplateArgs;
30173018 TemplateArgs.reserve (template_args_size);
@@ -3032,9 +3033,16 @@ namespace Cpp {
30323033
30333034 // We will create a new decl, push a transaction.
30343035#ifdef USE_CLING
3035- cling::Interpreter::PushTransactionRAII RAII (&getInterp () );
3036+ cling::Interpreter::PushTransactionRAII RAII (&I );
30363037#endif
3037- return InstantiateTemplate (TmplD, TemplateArgs, getSema ());
3038+ return InstantiateTemplate (TmplD, TemplateArgs, S);
3039+ }
3040+
3041+ TCppScope_t InstantiateTemplate (TCppScope_t tmpl,
3042+ const TemplateArgInfo* template_args,
3043+ size_t template_args_size) {
3044+ return InstantiateTemplate (getInterp (), tmpl, template_args,
3045+ template_args_size);
30383046 }
30393047
30403048 void GetClassTemplateInstantiationArgs (TCppScope_t templ_instance,
0 commit comments