codegen() really does emitAllDecls(); use new IncrementalParser interfaces.

This commit is contained in:
Axel Naumann 2013-06-25 10:53:29 +02:00 committed by sftnight
parent 0e6302f92c
commit a2bb0b2b46
2 changed files with 5 additions and 7 deletions

View File

@ -566,16 +566,14 @@ namespace cling {
///
CompilationResult execute(const std::string& input);
///\brief Generates code for a given transaction. NOTE: we will have to
/// think of better name because it doesn't do codegen only it applies the
/// specified by the compilation options transformations, too.
///\brief Generates code for all Decls of a transaction.
///
/// @param[in] T - The cling::Transaction that contains the declarations and
/// the compilation/generation options.
///
///\returns Whether the operation was fully successfil.
///
CompilationResult codegen(Transaction* T);
CompilationResult emitAllDecls(Transaction* T);
///\brief Loads header file or shared library.
///

View File

@ -592,10 +592,10 @@ namespace cling {
return Interpreter::kFailure;
}
Interpreter::CompilationResult Interpreter::codegen(Transaction* T) {
Interpreter::CompilationResult Interpreter::emitAllDecls(Transaction* T) {
assert(getCodeGenerator() && "No CodeGenerator?");
// FIXME: move this into the transaction's CompOpts.
m_IncrParser->commitTransaction(T, /*forceCodeGen*/ true);
m_IncrParser->markWholeTransactionAsUsed(T);
m_IncrParser->commitTransaction(T);
if (T->getState() == Transaction::kCommitted)
return Interpreter::kSuccess;
return Interpreter::kFailure;