diff --git a/lib/Interpreter/IncrementalParser.cpp b/lib/Interpreter/IncrementalParser.cpp index f0645447..3acd1903 100644 --- a/lib/Interpreter/IncrementalParser.cpp +++ b/lib/Interpreter/IncrementalParser.cpp @@ -223,6 +223,8 @@ namespace cling { commitTransaction(*I); } + if (hasCodeGenerator()) + T->setModule(getCodeGenerator()->GetModule()); // We are sure it's safe to pipe it through the transformers bool success = true; for (size_t i = 0; i < m_TTransformers.size(); ++i) { @@ -282,7 +284,6 @@ namespace cling { } getCodeGenerator()->HandleTranslationUnit(getCI()->getASTContext()); - T->setModule(getCodeGenerator()->GetModule()); // The static initializers might run anything and can thus cause more // decls that need to end up in a transaction. But this one is done diff --git a/lib/Interpreter/IncrementalParser.h b/lib/Interpreter/IncrementalParser.h index f4a87a58..0d04a11d 100644 --- a/lib/Interpreter/IncrementalParser.h +++ b/lib/Interpreter/IncrementalParser.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) -// version: $Id$ +// version: $Id: 2e7bf01c5cf0048b0e6353b5ba55d09cc0961993 $ // author: Axel Naumann //------------------------------------------------------------------------------