Set the llvm::Module earlier so that the TransactionTransformers could potentially use it.

This commit is contained in:
Vassil Vassilev 2013-06-14 09:37:45 +02:00 committed by sftnight
parent 09bf261456
commit 1340b29437
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// version: $Id: 2e7bf01c5cf0048b0e6353b5ba55d09cc0961993 $
// author: Axel Naumann <axel@cern.ch>
//------------------------------------------------------------------------------